css-shapes

CSS: Placing an arrow / triangle with border on the top of my drop down menu

心不动则不痛 提交于 2019-12-03 16:48:16
问题 Just launched this website (http://dovidoved.org/) and the client wants one of those triangles / arrows on the top of each drop down menu. Problem is the menu has a border around it and the arrow should mesh with both the background as well as the border. Not sure how to do that. Any suggestions? Must I have to use an image? Here's my CSS: /* creates triangle */ .main-navigation ul ul:before { border-bottom: 10px solid #fae0bb; border-left: 10px solid transparent; border-right: 10px solid

How to create a 3-segment donut/ring with CSS?

家住魔仙堡 提交于 2019-12-03 16:26:43
I'm trying to split a ring up into 3 segments, each segment would have text on it centered. I can figure out the text part, but out of the ways I've tried to do the ring, I can't seem to get it to split into 3 equal parts. Ideally, I'd like to do this with borders so I can add arrows to them, I tried to do this by splitting a circle but ran into problems with getting the text to sit where I need it. I'd like to keep this primarily to CSS, but I know the arrows on the segments will probably throw a roadblock. This is what I am trying to do https://jsfiddle.net/wrqpas09/ .segment { position:

Make div with bottom triangle

扶醉桌前 提交于 2019-12-03 16:02:10
I have been trying to do the white shape with a div: http://sircat.net/joomla/sircat/mies/2.png how do I get the diagonal shapes of the bottom of the div? I have this for the div: width: 620px; height: 440px; background-color: white; thank you Edit: just forget the bg behind the div, I want to make the div with the diagonal borders, not with the help of the bg because it is in the top layer You can also use borders and the :after pseudo selector: http://jsfiddle.net/qQySU/ #pointed { position: relative; margin: 0 auto; width: 200px; height: 200px; background-color: white; } #pointed:after,

Triangle shadow on CSS ribbon

半腔热情 提交于 2019-12-03 13:01:08
I am trying to replicate as pixel perfect as I can get and im having trouble trying to do the shadow on the right. Is this possible with css? CSS: *{margin:0px;padding:0px;} html { width:100%; height:100%; text-align: center; } .bold { font-weight:700; } #ribbon { padding: .34em 1em; margin: 0; margin-top: 5%; position:relative; color: #000; text-align: center; letter-spacing:0.1em; padding-top:12px; padding-bottom:12px; display: inline-block; background: #ffd82b; z-index:100; box-shadow: 0 7px 0px -2px #ebeced; } #ribbon:after { content: ""; width:3.2em; bottom:-.5em; position:absolute;

Waves in CSS or SVG

混江龙づ霸主 提交于 2019-12-03 12:38:21
问题 I'm trying to create soft waves with CSS and am having some trouble. I'm using border-radius right now to create waves but it looks more like clouds. I tried using transform: translateZ(180deg); but the div color is then upside down. Here's what I want: Here's what I have: .wave1 { left: 0%; margin-left: -50px; } .wave2 { margin-left: -69px; } .wave3 { margin-left: -69px; } .wave4 { margin-left: -69px; } .waves { width: 200%; clear: none; z-index: 100; position: absolute; margin-top: 200px;

Zig zag border for a circle?

柔情痞子 提交于 2019-12-03 11:34:06
问题 Based on many tutorials I am able to create a zig zag border for square/rectangle objects using :after and :before . However when it comes to circles there are no tutorials at all. I would like to create an object that looks like this: Is that possible by using CSS only? 回答1: I would consider using SVG with some rotation and use them as backgrounds. Here is an attempt that can give you an idea about how it can be done. Basically, the SVG is the same and we simply repeat and rotate until we

Unskewed child not aligning

南笙酒味 提交于 2019-12-03 11:29:20
问题 Note: This question is about a problem with output, and not about creation of any shape. I recently created a shape : .prog { position: relative; top: 20px; width: 150px; height: 120px; background: green; display: inline-block; transform: skewY(20deg); transform-origin: 0% 100%; transition: 0.8s ease; } .prog:before { content: ""; position: absolute; left: 150px; width: 150px; height: 120px; background: red; transform: skewY(-40deg); transform-origin: 0% 100%; transition: 0.8s ease; } <div

Create a bell shape with CSS

我的未来我决定 提交于 2019-12-03 09:47:31
问题 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

Incomplete borders around div

回眸只為那壹抹淺笑 提交于 2019-12-03 09:43:54
I am looking for a way to create an incomplete square with borders with some text and a background with pure css. Here is what I am trying to achieve: My initial idea is to create the shape based on three shapes and then colorize the borders accordingly: But I am a bit concerned about the adaptive version - scaling three shapes. So maybe a better idea, anyone? This approach allows you to: add any content and the borders will adapt around it regardless of height or width of the content support transparent background and can be displayed over an image or non plain colors doesn't add any

How to add arrow to div?

此生再无相见时 提交于 2019-12-03 09:32:17
I am trying to create error label for div with arrow, but have problem with centering. I get: I need something like: HTML: <div class="error-label-arrow"></div> <div class="error-label">This field is required.</div> CSS: div.error-label{ padding: 7px 10px 0 4px; color: #fff; background-color: #DA362A; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } div.error-label-arrow{ border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right:10px solid #DA362A; float: left; } Is it possible? Here is the fiddle Curt You can use CSS Pseudo classes to do