css-shapes

How to create a lollipop shape by stacking divs in a circular manner?

喜你入骨 提交于 2019-11-30 17:50:36
问题 How to stack divs in a circular manner in which last div should come beneath the first div but above the second last div. Is it possible with the css? any helps would be appreciated. Please find the Codepen. Giving the sample code snippet <div class="frame"> <div class="lolly-pop__wrapper"> <div class="lollypop-top"> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop-top__item"></div> <div class="lollypop

CSS design - rainbow

房东的猫 提交于 2019-11-30 17:04:39
问题 I want to create a rainbow using only CSS only. Below is an image of what is required. Here is my code (so far): * { margin: 0; padding: 0; } #r { height: 80vw; width: 80vw; background-color: #f00; position: absolute; z-index: 1; } #o { height: 76vw; width: 76vw; background-color: #fe6230; position: absolute; top: 2vw; left: 2vw; z-index: 2; } #y { height: 72vw; width: 72vw; background-color: #fef600; position: absolute; top: 4vw; left: 4vw; z-index: 3; } #g { height: 68vw; width: 68vw;

How to make diagonal circle border gradient?

淺唱寂寞╮ 提交于 2019-11-30 15:13:35
问题 I have a problem with CSS3. I don't know how to make a diagonal round gradient border like that: I found something like this: .box { width: 250px; height: 250px; margin: auto; background: #eee; border: 20px solid transparent; -moz-border-image: -moz-linear-gradient(top left, #3acfd5 0%, #3a4ed5 100%); -webkit-border-image: -webkit-linear-gradient(top left, #3acfd5 0%, #3a4ed5 100%); border-image: linear-gradient(to bottom right, #3acfd5 0%, #3a4ed5 100%); border-image-slice: 1; } <div class=

Drawing animated arc with pure CSS

瘦欲@ 提交于 2019-11-30 13:56:24
问题 I know it is possible to draw and animate arcs in svg and canvas. However, is it possible in css? I have created an arc using the following method: .arc{ width:150px; height:400px; border-radius:50%; border-right:1px solid black; border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid white; } Original Fiddle: http://jsfiddle.net/YGKWT/ (Broken link) But, how can I animate this? The only way I can think of is having a pure white div over it and sliding that div to the

How to create a sphere in css?

心不动则不痛 提交于 2019-11-30 13:23:01
问题 I have trying to create a 3D sphere using just pure css, but I've been unable to generate the shape required. I've seen a cylinder but I can't find any reference to creating an actual sphere . My current code looks like: .red { background-color: red; } .green { background-color: green; } .blue { background-color: blue; } .yellow { background-color: yellow; } .sphere { height: 200px; width: 200px; border-radius: 50%; text-align: center; vertical-align: middle; font-size: 500%; position:

CSS circles without width or height? : Is this possible with pure CSS or not?

拟墨画扇 提交于 2019-11-30 12:53:17
I can turn a div into a circle like this: .circle { background-color: rgba(0, 0139, 0139, 0.5); height: 200px; width: 200px; -moz-border-radius:50%; -webkit-border-radius: 50%; border-radius:50%; } <div class="circle"></div> </div> But i have to specify width height: I want to display three rows of text in DIV's with "no-wrap" so each of the 3 segments of text have there own line and are not wrapped. I want to display these in the center of a circle and have the circle expand to fit the lines of text. The text lines will be pulled from a database via PHP, and will vary in character length. The

CSS triangle with background image [duplicate]

佐手、 提交于 2019-11-30 11:41:35
This question already has an answer here: How do CSS triangles work? 18 answers Creating a transparent arrow above image in CSS3 2 answers Respected stackoverflowers, How do i create a triangle element with the background pattern? For example i need the div like this : But my state is like this : All examples with triangle elements use borders which cant have an img in that .... This is my subsection class which needs the coolarrow: <div class="subsection"><span>Ryan Gosling, Mr Landlord</span></div> .subsection { .box-shadow (0, -1px, 1px, 0, rgba(0, 0, 0, 0.3)); background: url('/assets

Css arrow Progress bar

给你一囗甜甜゛ 提交于 2019-11-30 09:24:05
I'm currently in the process of learning all about css, so I'm trying to generate different shapes with different functionalities. I am currently working on a project which requires a horizontal arrow to display the 'progress' of a transaction occurring. So i'm trying to generate an arrow 'progress bar' like: |\ | \ +----------------+ \ |XX| 10% > +----------------+ / \ | / \ |/ \the XX's depict a different color. I currently Am able to 'fill' up until the arrow head, but the way I've generated the arrow head,I can't seem to 'fill' it in line as well (i.e. at ~90%, half of the physical head

Drawing animated arc with pure CSS

浪尽此生 提交于 2019-11-30 09:05:16
I know it is possible to draw and animate arcs in svg and canvas. However, is it possible in css? I have created an arc using the following method: .arc{ width:150px; height:400px; border-radius:50%; border-right:1px solid black; border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid white; } Original Fiddle: http://jsfiddle.net/YGKWT/ (Broken link) But, how can I animate this? The only way I can think of is having a pure white div over it and sliding that div to the right gradually revealing the arc. Is there a better way? Edit: Here is the type of animation I am

How can I correctly add a shadow and a gradient to my shape?

一世执手 提交于 2019-11-30 08:27:48
I want to make the following design: I tried with :after and :before but it does not work. Here’s my current code: .design { background: #ea053a; display: inline-block; height: 155px; margin-left: 33px; margin-right: 40px; position: relative; width: 228px; } .design:before { border-top: 43px solid #ea053a; border-left: 50px solid transparent; border-right: 50px solid transparent; margin-right: 40px; content: ""; height: 0; left: 0; position: absolute; top: 55px; margin-top: 100px; width: 128px; } <div class="design"></div> ( fiddle ) How could I leave it the same as the original design and