css-shapes

L shaped div container

微笑、不失礼 提交于 2019-12-19 06:32:53
问题 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? 回答1: 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

L shaped div container

五迷三道 提交于 2019-12-19 06:31:22
问题 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? 回答1: 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

div with triangle at the bottom with background image

只谈情不闲聊 提交于 2019-12-19 06:03:01
问题 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 : 回答1:

div with triangle at the bottom with background image

谁都会走 提交于 2019-12-19 06:02:32
问题 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 : 回答1:

Semi-oval with CSS

只愿长相守 提交于 2019-12-19 05:46:06
问题 I'm trying to create a mix between an oval and a semi-circle. Semi-circles can be created as such in CSS: .halfCircle{ height:45px; width:90px; border-radius: 90px 90px 0 0; -moz-border-radius: 90px 90px 0 0; -webkit-border-radius: 90px 90px 0 0; background:green; } And ovals can be made like this: .oval { background-color: #80C5A0; width: 400px; height: 200px; margin: 100px auto 0px; border-radius: 200px / 100px; } But how can I make a semi-oval? Here's my attempt so far. The problem that

CSS ribbon with inside arrow on the right

寵の児 提交于 2019-12-19 04:15:07
问题 I want to create a ribbon effect like on this image (the red part of image): When I try to create an arrow effect with borders, the shape of object is completely destroyed: HTML code: <a href="#" class="mali_oglas_kategorija">Kategorija</a> CSS code so far (without trying to create the arrow): .mali_oglas_kategorija { position: relative; display: inline-block; font-weight: bold; width: 100px; padding: 6px 20px 6px 40px; margin: 10px 10px 10px -18px; color: #e5e5e5 !important; background-color

How to create a speech bubble in css?

霸气de小男生 提交于 2019-12-19 03:19:08
问题 I would like to create a speech like this, I try to create using CSS. But I cannot align the top arrow like this. My Code is, .bubble { position: relative; width: 275px; height: 40px; padding: 5px; background: #C00006; -webkit-border-radius: 14px; -moz-border-radius: 14px; border-radius: 14px; } .bubble:after { content: ''; position: absolute; border-style: solid; border-width: 0 19px 79px; border-color: #C00006 transparent; display: block; width: 0; z-index: 1; margin-left: -19px; top: -79px

Creating a triangle in css with a gradient background

家住魔仙堡 提交于 2019-12-19 03:17:06
问题 I am trying to create a triangle in css with a gradient background. I have not had any success as yet. Is there way to do this to bring off this effect seen in the image below. (The triangle that is attached to the Wrong password error box.) Design in Photoshop This is the design I have so far in HTML and CSS. Here is the css I have for the triangle at the moment. .error-triangle { wwidth: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right:

Triangular link area

安稳与你 提交于 2019-12-19 03:16:08
问题 Consider the following shapes: The grey area is an outside container. Disregard that. The white area is a link ( a tag). The red triangular area is another link ( a tag). I have created a CSS triangle for the red area using the following code: .ribbon { position: absolute; right: 0; bottom: 0; width: 60px; height: 60px; border-left: 60px solid transparent; border-bottom: 60px solid red; } The problem is that in the following image, the link doesn't maintain it's boundaries in the red triangle

Slanted text container

被刻印的时光 ゝ 提交于 2019-12-18 19:45:13
问题 I was wondering if any of you knew if it was possible to make anything looking like this : I know about http://www.infimum.dk/HTML/slantinfo.html but I can't put any text in the slanted areas . 回答1: Did it with a bit of javascript: http://jsfiddle.net/billymoon/AvmE8/ But that is just for convenience, you can do the same with HTML. Will not apply to all circumstances, and will need a little tweaking, but can be made to work for things you know the approximate length of - or know the upper