css-shapes

how to create Hollow triangle in css [duplicate]

空扰寡人 提交于 2019-12-18 19:18:13
问题 This question already has answers here : Create a triangle with CSS? (8 answers) Closed 3 years ago . I want create hollow triangle with CSS but I don't how to hollow that. I can create triangle with CSS but I have one problem and this is: I can't hollow this triangle. This is my code: HTML: <div id="tringle"></div> CSS: #tringle { position: absolute; height: 0; width: 0; top: 50%; left: 7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 7px solid white;

how to create Hollow triangle in css [duplicate]

痞子三分冷 提交于 2019-12-18 19:18:08
问题 This question already has answers here : Create a triangle with CSS? (8 answers) Closed 3 years ago . I want create hollow triangle with CSS but I don't how to hollow that. I can create triangle with CSS but I have one problem and this is: I can't hollow this triangle. This is my code: HTML: <div id="tringle"></div> CSS: #tringle { position: absolute; height: 0; width: 0; top: 50%; left: 7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 7px solid white;

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

梦想的初衷 提交于 2019-12-18 15:28:08
问题 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

Can I create this shape with CSS only?

核能气质少年 提交于 2019-12-18 13:53:22
问题 I'm building a hero section for a webpage that has a particular shape, at the moment I'm just using an image as an overlay for the actual section background, but I'm looking to reduce the amount of requests I make and would like to know if the following shape can be done using CSS: So the black part is where the actual image goes, while the white section is what I'm trying to build using CSS; 回答1: Here is an idea with one element and radial-gradient to approximate it .box { width: 400px;

CSS Transform to skew the shape to a trapezium

﹥>﹥吖頭↗ 提交于 2019-12-18 13:01:30
问题 I want to be able to skew an element in the way the image displays below. I have been playing around with it, but dont seem to be able to get close to replicating that shape. My css code is transform:skew(30deg,30deg); Is transform even the right way to do this? Please let me know the best, most browser compatible, solution. 回答1: You can apply some rotate transform around the X axis and apply an appropriate pespective before: div { width:300px; height:200px; background:url(http://placekitten

CSS Transform to skew the shape to a trapezium

巧了我就是萌 提交于 2019-12-18 13:01:22
问题 I want to be able to skew an element in the way the image displays below. I have been playing around with it, but dont seem to be able to get close to replicating that shape. My css code is transform:skew(30deg,30deg); Is transform even the right way to do this? Please let me know the best, most browser compatible, solution. 回答1: You can apply some rotate transform around the X axis and apply an appropriate pespective before: div { width:300px; height:200px; background:url(http://placekitten

How can I make a circular sector using CSS

感情迁移 提交于 2019-12-18 11:24:42
问题 I want to make a circular sector using CSS. The sectors will form a complete circle. How can I make it using CSS? I found a sample, but it makes a quarter circular sector. I want to make six circular sectors that make a complete circle. How can I make it? Note: I am not good at drawing, but here's a sample of what I want... div { width: 50px; height: 50px; background-color: #ccc; background-color: #ccc; -moz-border-radius: 100px; border-radius: 100px; } #center { position: relative; margin:

How can I make a circular sector using CSS

霸气de小男生 提交于 2019-12-18 11:23:55
问题 I want to make a circular sector using CSS. The sectors will form a complete circle. How can I make it using CSS? I found a sample, but it makes a quarter circular sector. I want to make six circular sectors that make a complete circle. How can I make it? Note: I am not good at drawing, but here's a sample of what I want... div { width: 50px; height: 50px; background-color: #ccc; background-color: #ccc; -moz-border-radius: 100px; border-radius: 100px; } #center { position: relative; margin:

Capsule shape using border-radius without a set width or height?

烂漫一生 提交于 2019-12-18 11:04:49
问题 Is it possible to make a capsule shape using border-radius without a set width or height? I want the left and right sides to be completely rounded while the capsule would remain straight along it's horizontal length. Setting the radius to 50% doesn't seem to give the desired affect. 回答1: Applying a very large border radius seems to work on many browsers (IE9+, FF, Chrome) like this mod of David's fiddle http://jsfiddle.net/cthQW/1/ border-radius: 500px; 回答2: Yes, this is possible (albeit I've

hexagonal shaped cells in html [duplicate]

痞子三分冷 提交于 2019-12-18 11:03:44
问题 This question already has answers here : Generate repeating hexagonal pattern with CSS3 (7 answers) Closed 6 years ago . Is there was a way to design a html block that is a hexagonal grid? Similar to that of a Bee hive. This looks more like a css styling task. 回答1: You can use a large border which will get slanted and you can make triangular shapes on an element, fyi. Example: http://jsfiddle.net/pAGJG/ So you can make a <div class="hexagon"> with a top triangle, middle section, and bottom