css-shapes

CSS oval shape cut out from div

最后都变了- 提交于 2019-12-01 05:45:00
The above image is what i'm trying to create but am having some difficulties with the oval shape. An explanation: The menu bar is a div with a slight linear gradient (dark grey to transparent lighter grey) The company logo image has a transparent bg and will sit 'ontop' of the menu bar The oval cutout will need to match the oval of the logo and have a transparent gap between that will show the background colour (this changes on each page, orange is just an example) I've tried and failed many times with a radial gradient - I was able to get a circle cut out but couldn't work out how to make it

Use css to create a custom arrow shape [duplicate]

纵饮孤独 提交于 2019-12-01 05:29:49
问题 This question already has an answer here : Arrow before and after a box with CSS (1 answer) Closed 4 years ago . I have a css arrow box overlaying an image slider but I need to make the tail indented and transparent so the image is seen behind it. Need the white portion to be transparent. See attached image and my css below. Thanks. #flag { width: 400px; height: 80px; background: #231f20; position: relative; } #flag:before { content: ""; position: absolute; top: 0; width: 0; height: 0; border

How to create a curve tail for speech bubble with CSS?

会有一股神秘感。 提交于 2019-12-01 04:55:29
问题 I'm creating a speech bubble with CSS and I have reached this far. .says{ width: 200px; padding: 20px; margin-right: 20px; background: #BF7EF2; color: #fff; box-shadow: -3px 3px 5px #C1B9C8; position: relative; border-radius: 5px; } .says:before{ content: ""; position: absolute; z-index: -1; top: 14px; right: -18px; height: 20px; border-right: 20px solid #BF7EF2; border-bottom-right-radius: 25px 20px; transform: translate(0, -4px); box-shadow: -3px 3px 5px #C1B9C8; } .says:after{ content: "";

How to create the Facebook Status arrowed textbox?

半城伤御伤魂 提交于 2019-12-01 04:50:32
问题 How can I get a curved TextBox like the Facebook Status TextBox with html and css only? Can Anybody illustrate me how to do that ?? 回答1: My Cross-Browser, CSS-only version of the Facebook-style textbox: HOW TO I've used :before on the inner container div (with 7px collapsed borders, three transparents, one white) to create a triangle where the borders intersect themselves, then i placed it just over the textbox with absolute positioning (overriding the textbox's border to "attach" the

Generate arrow line with CSS [duplicate]

淺唱寂寞╮ 提交于 2019-12-01 04:36:20
This question already has an answer here: Border with a transparent centred arrow 3 answers I am trying to generate a straight horizontal line with a breakdown in the middle to display an arrow. The idea is that the content displayed under the line will provide details about the content displayed above the line. Here is what the line should look like: I am trying to generate this with pure HTML and CSS (no bitmap images). Use of Font Awesome is acceptable if it ends up producing the right result. I need control over the line's thickness and color. The angle of the breakdown does not matter (45

border radius with css triangles

妖精的绣舞 提交于 2019-12-01 04:29:16
问题 I have a rectangle where each side of the diagonal has it's own color div { width: 0; height: 0; border-left: 150px solid green; border-top: 100px solid gray; } Now I wanted to add a border-radius to the div, but then I noticed that this works fine for all sides except for bottom left. So if I add: border-radius: 10px 10px 10px 0; I get this: .. but as soon as I add a bottom left border-radius, I get this: 1) Why does this happen? 2) Is there an easy fix? Edit: I'm using Chrome, but I just

L shaped div container

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 04:00:24
I am trying to draw following "L" shaped div using CSS. How can I draw this shape so contained text flows in this L shaped container? Like so: HTML: <div class="container"> <div class="mask"></div> <p>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia

div with triangle at the bottom with background image

狂风中的少年 提交于 2019-12-01 03:58:30
I want to make a div , with a triangle at the bottom . But I need the background image on the triangle to appear, I've tried using a pseudo element ( :after ) but it doesn't work. #homebg:after{ content:''; position: absolute; top: 100%; left: 0; right: 0; margin: 0 auto; width: 0; height: 0; border-top: solid 50px #fff; border-left: solid 48vw transparent; border-right: solid 48vw transparent; } I need to make the div appear like in this image with the background in the triangle : web-tiki Triangle over a plain color If the triangle is displayed over a plain color, you can use this approach

Is it possible to have a non-rectangular div?

跟風遠走 提交于 2019-12-01 03:27:21
I need to shape ONE div tag in the following shape: Is it possible to make it cross browser? I don't necessarily need rounded corners. I need it so I can change the color of the borders of the whole div on hover, so I assume it can't be achieved by using two div s. Yeah, you can do that using HTML and CSS like this: http://jsfiddle.net/broofa/364Eq/ It's essentially using three divs to aggregate the mouse events, like so: <div id="outer"> <div class="inner"></div> <div class="inner"></div> </div> And I use a :hover rule on the outer element to affect the border colors on the inner divs: #outer

Add inner corner curved border to active menu

笑着哭i 提交于 2019-12-01 03:14:31
I am trying to create an inner curved border for active/selected menu. Below snippet is so far the best I can do, the square corner shouldn't be visible. Solutions from google doesn't seem to help... Please help me play with it. Thanks guys! FIDDLE HERE. body { background:#eee;width:90%;margin:20px auto } ul { margin: 0; padding: 0; } ul li { display: inline-block; list-style: none; position: relative; vertical-align:bottom; } ul li a { padding: 10px 15px; display: block; line-height: 25px; margin-bottom:-1px; } ul li.active a { background:#fff; border:1px solid #aaa; border-bottom:0; border