css-shapes

Creating a dynamic Tank level/meter using html and css

一个人想着一个人 提交于 2019-11-27 18:26:41
问题 I am currently having problems creating a 'tank gauging system' within my project. I am using MVC and the by using the following markup, I have achieved this: by using: #container { position:absolute; margin:0; margin-top:-50px; width:100%; padding:0; -moz-perspective: 1000px; /*required to make cylinder shape*/ -webkit-perspective: 1000px; } #frame { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; margin-left:5%; -moz-transform: rotateX(0deg) rotateY(0deg) rotateZ

How can I make a full width wave in CSS

做~自己de王妃 提交于 2019-11-27 18:14:57
问题 I have been tasked with building a website. On this website they have footer in their mockup in the shape of a wave. See image below: I can probably get away with not having the stroke or yellow line. The main issue is they would like to have this "footer wave" be 100% width. I was thinking there could be a CSS solution to this? Possibly recreating the shape in css? Is this possible? 回答1: If your footer once will become a complex image and it'll be hard to draw it with SVG and it could be

How to make rectangular image appear circular with CSS

我只是一个虾纸丫 提交于 2019-11-27 18:05:00
I've used border-radius: 50% or border-radius: 999em , but the problem is the same: with squared images there's no problem, but with rectangular images I obtain an oval circle. I'm also disposed to crop a part of the image (obviously). Is there's a way to do that with pure CSS (or at least JavaScript / jQuery), without using a <div> with a background-image , but only using the <img> tag? I presume that your problem with background-image is that it would be inefficient with a source for each image inside a stylesheet. My suggestion is to set the source inline: <div style = 'background-image:

CSS - circle border with various colors

给你一囗甜甜゛ 提交于 2019-11-27 16:41:32
问题 Does anybody know how to create this in CSS or if it's even possible. I know how to make quarter circles but I am not sure how to apply it in this format. Small chunks of the border need to be in different colors. 回答1: If you really want to do this with CSS, you could potentially use a clipping mask to get the effect you're after. This approach is subject to browser compatibility, though, so I don't know how useful it would be, unless you're in a closed environment. It's not perfect, either.

How to transform each side of a shape separately?

一笑奈何 提交于 2019-11-27 15:53:42
How do I create a CSS shape in which each side is transformed separately. Something like the shape in the below image. Is that possible using CSS only without images? I don't think there is any way in CSS to pick and transform each side separately but you can achieve the shape in question by using perspective transforms (pure CSS). Rotating the element with perspective along both X and Y axes sort of produces the effect of each side having a separate transformation. You can adjust the angles and the perspective setting to create the shape exactly as required. .shape { background: black; margin

CSS shape with inset curve and transparent background

久未见 提交于 2019-11-27 15:39:37
I need to create a CSS shape like this image.. Please check this fiddle of my work I have created something like that, but I cannot give a curve to it. #shape { border-left: 70px solid transparent; border-top: 100px solid red; height: 0; width: 200px; } Can anyone help me? You can use a pseudo element with border-radius and background-shadows to create the curve and enable a transparent background for the curve. Output : #shape { width: 300px; height: 100px; position: relative; overflow: hidden; } #shape:before { content: ''; position: absolute; top: 10%; right: 0; width: 300%; padding-bottom:

Make CSS3 triangle with linear gradient

 ̄綄美尐妖づ 提交于 2019-11-27 15:16:26
I need to create button with triangle on one side (like this http://css-tricks.com/triangle-breadcrumbs/ ) with linear vertical gradient and border, and I want to use pure CSS3. It's ok if I need 45deg "triangle", I just write smth like this .button:after { -webkit-transform: rotate(45deg); background: -webkit-linear-gradient(-45deg, #fff, #000); content: ''; width: 2em; height: 2em; display: block; } and hide half of that pseudo-element under .button (so only another half of it is visible, like a triangle). But if I need another angle (e.g. more steep) - I can't make it with standart XY

How to give a div oval shape?

ε祈祈猫儿з 提交于 2019-11-27 15:06:45
I tried a lot on oval shape which have cut in both sides but not able to do it please I need code for oval shape with cut in both side.. Here's my code below:- .demo{ width: 100%; height: 600px; background: white; -moz-border-radius: 100px / 50px; -webkit-border-radius: 100px / 178px; border-radius: 694px / 208px; z-index: 100; position: relative; } Is this OK ? HTML <div id="oval_parent"> <div id="oval"></div> </div> CSS #oval_parent{ background:black; width:200px; height:120px; overflow:hidden; } #oval{ width: 220px; height: 100px; margin:10px 0 0 -10px; background: white; -moz-border-radius

Create a cross shape in CSS

时光怂恿深爱的人放手 提交于 2019-11-27 15:04:07
IS it possible, I know all the following shapes are possible in this link: http://css-tricks.com/examples/ShapesOfCSS/ but cross must be possible too. When I say cross I mean like this: You could achieve something like this with pseudoelements only: http://jsbin.com/upiyoc/1/edit #cross { width: 100px; height: 100px; position: relative; } #cross:before, #cross:after { content: ""; position: absolute; z-index: -1; background: #d00; } #cross:before { left: 50%; width: 30%; margin-left: -15%; height: 100%; } #cross:after { top: 50%; height: 30%; margin-top: -15%; width: 100%; } The size of the

Achieving arrow-like shapes in a banner in CSS

有些话、适合烂在心里 提交于 2019-11-27 14:58:32
问题 I want to achieve the following shapes using pure CSS, no images. I've come to the following point. Here is the HTML structure: <div class="sixteen columns"> <div id="applicationStatus"> <ul> <li class="applicationStatus">Application Received</li> <li class="applicationStatusGood">Language Exam</li> <li class="applicationStatusNoGood">Oral Exam</li> <li class="applicationStatus">Grant</li> </ul> </div> </div> And here is the CSS : #applicationStatus { position: relative; width: auto; height: