css-shapes

How can I draw a left pointing triangle using CSS?

我只是一个虾纸丫 提交于 2019-12-02 03:31:22
It has been a long time since I built this triangle which points up. How can I alter my CSS to point the corner left? http://jsfiddle.net/3sP8q/ .left-corner { width: 0; height: 0; border-bottom: 15px solid #000; border-left: 15px solid transparent; border-right: 15px solid transparent; position: relative; } <div class="left-corner"></div> Albzi Here is how: .left-corner { width: 0; height: 0; border-top: 50px solid transparent; border-right: 100px solid red; border-bottom: 50px solid transparent; } <div class="left-corner"></div> Use CSS-Tricks , it helps a lot! 来源: https://stackoverflow.com

CSS3 label tag facing right and using position or :after

喜欢而已 提交于 2019-12-02 03:12:36
I am trying to construct this shape in CSS: But I can't figure out how to put the triangle shape (considering I have a rectangle for the "body" of the tag and a triangle for the tip) facing right. Because I'm working with positions, how can I tell the triangle to appear right after the rectangle, when tags can all have different sizes? I just can't work it out. You can check the fiddle: http://jsfiddle.net/ExZFe/ with a similar tag to the one I'm making. This example uses just positions, so giving the triangle a fixed position is useless. I tried with :after but got stuck too, because of the

create ribbon with css

不羁的心 提交于 2019-12-02 02:29:39
I have sidebar menu finally created. now I need create ribbon on selected item like show image (red) (I need really gray color ribbon). But I don't want use image background and use only css class. So dynamically I can remove class name and add to another item. I have a you_are_here class which selected item in that I want see ribbon. Is it possible to do that? <ul class="outer"> <li> <p class="top">My Account</p> <ul class="inner"> <li><a href="#">My Account Home</a></li> </ul> </li> <li> <p>Demographics</p> <ul class="inner"> <li><a href="#">Addresses</a></li> <li class="you_are_here"><a

CSS Only Pie Chart - How to add spacing/padding between slices?

安稳与你 提交于 2019-12-02 02:28:52
问题 I've built a CSS only pie chart, but I need to add space between each slice almost as if it were a border. I've attempted to add a border to each slice but that doesn't actually work. Any ideas on how to make this CSS pie chart look more like the following image? Here is my code: .palette { height: 48px; width: 48px; } .palette .colorOuter1, .palette .colorOuter2, .palette .colorOuter3, .palette .colorOuter4, .palette .colorOuter5 { height: 200px; width: 200px; border-radius: 50%; position:

Trapezoid div in CSS

时光总嘲笑我的痴心妄想 提交于 2019-12-02 01:30:34
问题 I want sections with content in a trapezoid div but I don't know how to start or what the best way is to achieve my goal: I had come across this solution but there isn't much info for me to understand CSS3 Transform to Trapezoid HTML <div class="section"> <p>content here</p> </div> 回答1: Here is a way to create a trapzoid like div. This uses the ::before and ::after pseudo elements .example { margin: 20px 0px; position: relative; display: inline-block; width: 200px; height: 200px; background

Rotate a background element slightly

泪湿孤枕 提交于 2019-12-02 00:42:14
问题 I have created a lay-out where the background element is slightly rotated to the upper-left. But however I saw something you can do it with SVG but never actually worked with it before. Right now I use the following technique: .background { width:100%; margin-left: -160px; margin-right: -160px; transform: rotate(20deg); } and that rotate the elements the opposite direction that they are just horizontal aligned. But it doesn't really fit my screen when I zoom out or I need to have a lot of

Bigger area for hovering multiple small circles

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 23:07:44
问题 I currently have a map. On this map I several small circles/dots created with border-radius . Hovering a dot animates the dot + other stuff. MY ISSUE: Right now I have to be VERY precise to hover a dot because it's so small. Im wondering if its possible to create a bigger invisible hitzone hover area or similar surrounding the dot, thus making it easier to interact with the dot? Here is an example : $("#map-container").find(".dot-item") .mouseenter(function() { console.log("over"); $(this)

CSS3 image with round corners and a very light oval shape

試著忘記壹切 提交于 2019-12-01 22:14:45
Hello I'm looking to build in CSS3 an image with round corners and a very light oval shape, like in this pic. Not sure if it's possible and how. I know how to build a round image or an image with round corners, but this is a little different. UPDATE Here is what I've done .round{ background-color:red; width:100px; height:100px; border-top-left-radius: 45px 40px; border-top-right-radius: 45px 40px; border-bottom-left-radius: 45px 40px; border-bottom-right-radius: 45px 40px; } http://jsfiddle.net/7t1z3hxf/9/ UPDATE2 Here are the schematics of what I'm trying to achieve Thanks If perfect

Bigger area for hovering multiple small circles

你。 提交于 2019-12-01 22:13:05
I currently have a map. On this map I several small circles/dots created with border-radius . Hovering a dot animates the dot + other stuff. MY ISSUE: Right now I have to be VERY precise to hover a dot because it's so small. Im wondering if its possible to create a bigger invisible hitzone hover area or similar surrounding the dot, thus making it easier to interact with the dot? Here is an example : $("#map-container").find(".dot-item") .mouseenter(function() { console.log("over"); $(this).css("width","10"); $(this).css("height","10"); }) .mouseleave(function() { console.log("out"); $(this)

Color border in corners seperatly

做~自己de王妃 提交于 2019-12-01 22:05:18
问题 Is there any way to color a border corner in CSS? I.e. : border-top-left-corner-color: red If it can't be done in pure CSS, can it be done with some JS/jQuery trickery? 回答1: You can color each border corner seperately with 4 pseudo elements and style each corner's border color, width and style seperatly : DEMO .outer{ width:500px; height:500px; background:gold; position:relative; } div:before, div:after{ content:''; position:absolute; height:10%; width:10%; } .outer:after{ right:0; border