css-shapes

CSS apply border to a cloud shape?

夙愿已清 提交于 2019-12-03 01:47:45
I drew a cloud via CSS3 using different div tags I am trying to add a border to the whole shape but I am having trouble since every shape get its own border how can I apply a border to the whole cloud? HTML: <div id="cloud"> <div id="bottom_c"></div> <div id="right_c"></div> <div id="left_c"></div> </div> CSS: * { margin: 0; padding: 0; border: 0; } body{ background-color: #4ca3ff; } #cloud { position: absolute; } #bottom_c { position: relative; top: 200px; left: 500px; width: 350px; height: 150px; background-color: #fff; border-radius: 100px; border: solid 5px black; z-index: 100; } #right_c{

How to draw a checkmark / tick using CSS?

夙愿已清 提交于 2019-12-03 01:19:26
问题 How to draw the tick symbol using CSS? The symbols I find using Unicode isn't aesthetically-pleasing. EDIT Icon fonts are a great suggestion. I was looking for something like this. 回答1: You can now include web fonts and even shrink down the file size with just the glyphs you need. https://github.com/fontello/fontello http://fontello.com/ li:before { content:'[add icon symbol here]'; font-family: [my cool web icon font here]; display:inline-block; vertical-align: top; line-height: 1em; width:

Create a bell shape with CSS

别来无恙 提交于 2019-12-03 00:17:41
I am playing with shapes in css and want to make a traditional bell shape (think Christmas bell). Here's the general shape that I'm going for (though I really don't care about the balls on the top and bottom): Here's what I have so far: http://jsfiddle.net/bhlaird/NeBtU/ #bell { left:300px; position: relative; } #bell:before, #bell:after { position: absolute; content: ""; left: 50px; top: 0; width: 180px; height:400px; background: #d3d3d3; border-radius: 150px 150px 150px 20px; -webkit-transform: rotate(15deg); -webkit-transform-origin: 0 0; } #bell:after { left: 0; -webkit-transform: rotate(

Draw line after a title with CSS [duplicate]

半城伤御伤魂 提交于 2019-12-02 22:50:40
问题 This question already has answers here : Title with lines filling remaining space on both sides (5 answers) Closed 4 years ago . How can I draw a line like after title text like this : "TITLE ________" In CSS ? The "_" should complete the rest of the div and fill the remaining space. 回答1: Based on this answer : h1{ overflow:hidden; } h1:after{ content:''; display:inline-block; width:100%; height:100%; margin-right:-100%; border-bottom:1px solid #000; } <h1>Title</h1> <h1>Longer Title</h1> 回答2

How to achieve curved top pointer

随声附和 提交于 2019-12-02 20:26:39
问题 Can anyone please help with this? How to achieve the attached button with CSS only(no image)? This is my code so far: .triangle-up { width: 0; height: 0; border-left: 25px solid transparent; border-right: 25px solid transparent; border-bottom: 50px solid #555; } <div class="triangle-up"></div> 回答1: One option is to create a normal rectangle and then position two circles over it, such that they create a curved point. In the demo below, this rectangle is represented by the .point div, and the

how to handle 'double opacity' of two overlapping divs

青春壹個敷衍的年華 提交于 2019-12-02 19:47:12
问题 I have two divs, both with 0.6 opacity. I need them to overlap but retain their opacity and not create a new combined opacity level. I can't use an image. EDIT -- The little circle is supposed to have a canvas element in it. Not sure if pseudo-elements would be the best solution. Is there anyway to do this with CSS, or should I just use canvas? example - http://dabblet.com/gist/1566209 HTML: <div id="foo"> <div id="bar"> </div> </div> CSS: /** * Double Opacity */ body{background:green;} #foo{

CSS radial menu

为君一笑 提交于 2019-12-02 19:39:44
What I'd like to do: I would like to create a radial menu as shown below, considering all elements in the picture interactive, i.e the image in centre as well as the four quarters around it. It's important that the solution is cross-browser compatible. This is just a simple example as the parts dont really have to be quarters, they can be any possible number of parts : Solutions Tried So Far : I have tried using CSS3 round div with border , where the border have these images as background, but doesnt really work well, as each element has to be a stand-alone element. I heard about css-shapes,

Adding CSS Trapezoid Shape :After Button

南楼画角 提交于 2019-12-02 18:22:10
问题 I'm attempting to create a button style for a client, and cannot seem to get it working using the after pseudo-class. <style> $varBase: 40px; $imsblue: #012169; $imsgrey: #012169; body { background:grey; } .btn { position: relative; float: left; height: $varBase; font-family: sans-serif; text-align: center; line-height: $varBase; color: white; white-space: nowrap; text-transform: uppercase; background: $imsblue; &:before { float: left; content:""; width: ($varBase/4); height: ($varBase/2); }

How to draw a checkmark / tick using CSS?

拈花ヽ惹草 提交于 2019-12-02 14:37:00
How to draw the tick symbol using CSS? The symbols I find using Unicode isn't aesthetically-pleasing. EDIT Icon fonts are a great suggestion. I was looking for something like this . You can now include web fonts and even shrink down the file size with just the glyphs you need. https://github.com/fontello/fontello http://fontello.com/ li:before { content:'[add icon symbol here]'; font-family: [my cool web icon font here]; display:inline-block; vertical-align: top; line-height: 1em; width: 1em; height:1em; margin-right: 0.3em; text-align: center; color: #999; } You can draw two rectangles and

CSS responsive slanted edge

一笑奈何 提交于 2019-12-02 13:22:19
I'm creating a basic webpage, but for the footer there is going to be a slanted edge that will run at the bottom of the page. Where I am having issues as you are unable to add 100% on a border, as i am using bootstrap, so the page must be responsive. Is there a way to achieve this affect whilst being responsive. div { width:200px; height:80px; background: red; top:150px;left:100px; position: relative; } div:before { content: ''; position: absolute; top: 40px; right: 0; border-right: 200px solid white; border-top: 40px solid red; width: 20; } http://jsfiddle.net/2bZAW/3675/ This should work for