css-shapes

Create a Button with right triangle/pointer

一个人想着一个人 提交于 2020-01-11 05:25:06
问题 Looking to create this: What would be the best way to achieve it? IT MUST: I'd definitely like to keep the text as text (so not using an image). Also, I'd like this to be re-usable so that I can put different text in it. Ideally, the arrow part should be as high as the text. NICE TO HAVE: I'd like to be able to drop this on any background (so it isn't always on white) Would be great if it was ie8+ Thanks!! 回答1: Have you tried something using html/css?? #vert_menu{ overflow: hidden; width: 100

CSS triangle with background image [duplicate]

半城伤御伤魂 提交于 2020-01-10 18:17:19
问题 This question already has answers here : How do CSS triangles work? (19 answers) Creating a transparent arrow above image in CSS3 (2 answers) Closed 6 years ago . 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

CSS triangle with background image [duplicate]

懵懂的女人 提交于 2020-01-10 18:17:16
问题 This question already has answers here : How do CSS triangles work? (19 answers) Creating a transparent arrow above image in CSS3 (2 answers) Closed 6 years ago . 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

How to use skew only in the parent element?

假装没事ソ 提交于 2020-01-10 03:03:51
问题 Is there any way to use skew only in a parent element? I need to create something like a 'diamond' as a mask and the child elements can't be affected. There is no way, in this case, to use png as a mask. Thanks in advance! 回答1: It's really easy, you just need to unskew the thing for the children. Unskew means applying another skew transform, but of opposite angle this time. .parent { transform: skewX(45deg); } .parent > * { transform: skew(-45deg); } In general, if you apply a number of

How to use skew only in the parent element?

二次信任 提交于 2020-01-10 03:03:04
问题 Is there any way to use skew only in a parent element? I need to create something like a 'diamond' as a mask and the child elements can't be affected. There is no way, in this case, to use png as a mask. Thanks in advance! 回答1: It's really easy, you just need to unskew the thing for the children. Unskew means applying another skew transform, but of opposite angle this time. .parent { transform: skewX(45deg); } .parent > * { transform: skew(-45deg); } In general, if you apply a number of

Adding box-shadow to a :after pseudo element

我的未来我决定 提交于 2020-01-09 19:23:05
问题 I have a div called .testimonial-inner and using the :after pseudo element I have an arrow that sits underneath it pointing down. The problem I'm having is adding a box-shadow to it all so they both look like one natural element. Without box-shadow on the triangle: body { background: #eee } .testimonial-inner { background: #fff; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding: 30px; display: block; margin-bottom: 25px; position: relative; -webkit-box-shadow:

Creating responsive triangles with CSS

家住魔仙堡 提交于 2020-01-09 19:12:09
问题 I was trying to create triangles in CSS for a responsive site today and couldn't find a good example on stackoverflow, so here's how I did it. 回答1: Making angular shapes responsive is a little tricky because you can't use percentages as border values in your CSS, so I wrote a couple functions to calculate the page width and resize a triangle accordingly. The first calculates the size on loading the page, the second recalculates the size as the page width changes. CSS: .triangle { width: 0;

Creating responsive triangles with CSS

旧巷老猫 提交于 2020-01-09 19:11:54
问题 I was trying to create triangles in CSS for a responsive site today and couldn't find a good example on stackoverflow, so here's how I did it. 回答1: Making angular shapes responsive is a little tricky because you can't use percentages as border values in your CSS, so I wrote a couple functions to calculate the page width and resize a triangle accordingly. The first calculates the size on loading the page, the second recalculates the size as the page width changes. CSS: .triangle { width: 0;

Creating responsive triangles with CSS

落爺英雄遲暮 提交于 2020-01-09 19:11:30
问题 I was trying to create triangles in CSS for a responsive site today and couldn't find a good example on stackoverflow, so here's how I did it. 回答1: Making angular shapes responsive is a little tricky because you can't use percentages as border values in your CSS, so I wrote a couple functions to calculate the page width and resize a triangle accordingly. The first calculates the size on loading the page, the second recalculates the size as the page width changes. CSS: .triangle { width: 0;

Creating responsive triangles with CSS

孤者浪人 提交于 2020-01-09 19:11:08
问题 I was trying to create triangles in CSS for a responsive site today and couldn't find a good example on stackoverflow, so here's how I did it. 回答1: Making angular shapes responsive is a little tricky because you can't use percentages as border values in your CSS, so I wrote a couple functions to calculate the page width and resize a triangle accordingly. The first calculates the size on loading the page, the second recalculates the size as the page width changes. CSS: .triangle { width: 0;