Questions tagged [css-shapes]

CSS-Shapes are made by the use of Cascade Styling Sheets to make HTML elements into shapes and images. The most basic shapes include triangles, squares, and circles but can be made into more advance shapes such as hearts, octagons, and stars.

CSS Shapes pertain to questions about the rendering, bugs, and technical problems of HTML/CSS made shapes. These can be used on any tag but needs to be displayed as a block or inline-block elements. CSS Shapes can be used to direct viewers attention to certain elements on the page, make graphics, page structure, and objects.

Here is a simple CSS triangle,

.left-tri {
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent; 
    border-right: 10px solid brown; 
}

Here is the most common CSS shape,

.square {
    width: 100px;
    height: 100px;
    background: brown;
}

One benefit of using a CSS Shape is the ability to render to any monitor's display without becoming pixelated. CSS Shapes are very similar to an SVG(Scalable Vector Graphic) but remove the use of an image file. They also can allow the developer to rely more on CSS to style the page.


CSS-Shapes (CSS Exclusion) is a new tool Adobe has been working on. Currently the browser support is very poor. With CSS Exclusion you can add paths for text to wrap around or inside of that object to get flush text structure without an image. (Example, must enable CSS Exclusion on your browser to view)

Not all CSS Shapes have back browser support, for CSS Exclusions refer to the Browser Support tab.


References

Browser Support

Shape Generator Tools

1859 questions
0
votes
2 answers

Transparent arrow on right side of image

I'm trying to put a transparent arrow on the right side of an image, vertically in the centre and showing the background image. I've read this answer, and this codepen is basically exactly what I want, but I can't get my head around why it works and…
Robkwood
  • 345
  • 3
  • 5
  • 17
0
votes
1 answer

Create figure in CSS

(source: renemax.nl) I need to create a figure like this with CSS codes. The black could be completly covered with a background-image or a softer backgroundcolor with text (quotes) on it. Is this possible to create with CSS? I can't find this…
Jasper Renema
  • 143
  • 2
  • 10
0
votes
1 answer

How to notch out the corner of a div, with border and transparent notch

I have been tasked with developing 2 divs, the bottom div must have a border all the way around it, and have the top right corner notched out. The top div must also contain a border, and the bottom right corner of the div should be the inverse of a…
0
votes
1 answer

Create an arrow with a mouseover effect

I'd like to create a simple arrow with a mouseover effect. I create a span and a triangle. But now I need a mouseover effect which should apply to the whole arrow. Any Idea? I put my Sourcetext in a fiddle. HTML
HamburgIsNice
  • 105
  • 1
  • 10
0
votes
2 answers

Irregular shape drawing with css (should be responsive)

Is there any way to draw a shape (image below) with css? The grey border style should be dashed. And the most important is it should be responsive (should adapt different size of screen with different radius). Bad example (not responsive): #box…
GoneWithSin
  • 99
  • 1
  • 9
0
votes
3 answers

Irregularly shaped container with background in CSS

Hi, I have come across a quite challenging situation. I sort of understand how to make all kinds of different shapes with CSS but what about when its a container with something inside that on top of that has a background like this: (please see it…
Cain Nuke
  • 2,843
  • 5
  • 42
  • 65
0
votes
4 answers

CSS - Triangle down

How do I create an arrow down (triangle) when hovering over a link? something like the result tab on CodePen, see here I was trying to create the triangle by following the the tutorial above, but no luck a{ background: red; float: left; …
NorthernLights
  • 370
  • 3
  • 16
0
votes
0 answers

CSS Shape alignment issue

I'm having trouble aligning CSS arrows: The spacing between all elements is different, and the arrows don't quite fit either. Also when shrinking the browser size, the elements lap over the top of each other. Any help would be appreciated,…
A Houghton
  • 372
  • 5
  • 18
0
votes
4 answers

css div containers with irregular shapes

Hi, I am aware that it is possible to achieve all kind of shapes with CSS but I havent found an example that allows you to actually put content INSIDE which is READABLE as well. I want to make a div that looks like a trapezoid and put some text in…
Cain Nuke
  • 2,843
  • 5
  • 42
  • 65
0
votes
0 answers

Vertical Arrowed Process just with 'div' element and css?

I have to do something similar to the capture (see below) in my website. I use to do this with Photoshop. But this time I would like to know if this can be done with 3 'div' elements and css. Update: this one is similar How to make this arrow in CSS…
JPashs
  • 13,044
  • 10
  • 42
  • 65
0
votes
4 answers

Adding a 45 degree angle to a container

I have a container element that I am trying to figure out if I can shape it to have two 45 degree angles. Like this: It is simply a rectangle now:
Becky
  • 2,283
  • 2
  • 23
  • 50
0
votes
1 answer

Creating 'wing' corner trick with pure css

Is it possible to add corners like this image (top corners)? I'm not sure what the effect is called. If it is, what would be your approach? Update: There were some who suggested that this question is a duplicate, unfortunately, the solution to the…
Philll_t
  • 4,267
  • 5
  • 45
  • 59
0
votes
0 answers

Split website page on two parts with diagonal line

I'm building a website and my home page(index) needs to be splitted on two parts. Left(white) and Right(blue). So both sides needs to be links and to have hover effect. For example, when I hover on right side it should be a little bit extended. So…
0
votes
2 answers

Is it possible to give a bootstrap btn a 5 point?

I'm looking to make a bootstrap btn look a little differently with there being a 5 point at the bottom of its base. I know its possible to do shapes this way using the :before and :after tools and transform but I want to put text inside of them…
Bs3kg
  • 109
  • 1
  • 2
  • 13
0
votes
2 answers

I want to make the marking area it responsive

The border 500px is fixed. How to make it responsive? it is on .page1::before area. .page1{ width:100%; height:auto; clear:both; padding:90px 0 40px 0; background-color:#0D9DDA; position:relative; } .page1::before{ …
Shahid
  • 19
  • 4
1 2 3
99
100