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
3 answers

CSS - How to add a border color to a css shape

I need to add a border color to a css shape but i don't know how to do that. I already try with border or border-width but doesn't work. This is my code: .shape { width: 400px; height: 40px; background-color: green; …
user3242861
  • 1,839
  • 12
  • 48
  • 93
0
votes
1 answer

Box with clipped corners

I need a box with all clipped corners. Here's what I have so far: body { height: 200px; background: -webkit-linear-gradient(left, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1)); background: -o-linear-gradient(right, rgba(255, 0, 0, 0), rgba(255,…
ExrowGe
  • 47
  • 10
0
votes
4 answers

How to create a layer (with opacity) on above an image?

How can we create the effect as shown in below image?
Durgesh Dangi
  • 215
  • 2
  • 13
0
votes
1 answer

create a rounded rectangle in 3d perspective with css

Can anyone help me with creating the following rounded rectangle in 3d perspective with css? image: rounded rectangle in 3d perspective
k-Dushi
  • 23
  • 6
0
votes
0 answers

CSS 3 Shape cut out circle

I want to create this shape: is this even possible with CSS without images?
0
votes
1 answer

How to timing an css3 shape animation for breathe recreation

I have an Ionic 2 app and I need to recreate something like this with css3 shapes. I have already implemented it and it works very well for infinite expand and contract my circle, but I need to stop around 3 secs in the "hold" instruction, and…
Ivan Lencina
  • 1,787
  • 1
  • 14
  • 25
0
votes
1 answer

Creating shapes with css gradient

How we can create the responsive shape with css gradient like the attached image.
Mehar
  • 2,158
  • 3
  • 23
  • 46
0
votes
1 answer

Circular arrows with gradient

I tried to make it with border but gradient makes it impossible. Maybe I can make four divs and make it like that?
RaShe
  • 1,851
  • 3
  • 28
  • 42
0
votes
4 answers

Coloring CSS half-circle

I made a half-circle, and I want to color it according to the percentage I need. The position of the text doesn't matter for now. What I want is to have 50% of the border colored. Later I will need 70% and 80%. How do I do…
0
votes
0 answers

Image Size Within SVG HTML

I'm trying to get an image inside of a SVG Generated Hexagon but can't quite get the image to fit nicely within the SVG. Small images appear blurred and large ones are too large and don't scale down. If someone knows a way to get the image within…
Josh Walshaw
  • 200
  • 1
  • 2
  • 17
0
votes
0 answers

background css mask transition - css shape to 100% width and height?

I'm trying to realise the following: On hover an item, I would like the background color of my container to change with a new transition. For this I am thinking to use a shape mask by css like a circle shape. on hover the item, the background shape…
tibewww
  • 593
  • 4
  • 11
  • 32
0
votes
1 answer

Create consistent and responsive curve with css or svg

I've got to create a curved overlay on top of an a grey bg and for it to maintain its proportions no matter the screen width (apart from mobile size) as some text will go on top and needs to be on the white section at all times. I have been…
John
  • 833
  • 1
  • 11
  • 24
0
votes
0 answers

Floating a circle in the center of text

I have an image of myself that I want to center in text. It is a circle so I am using shape-outside but I cannot find a way to center it in my text and have it actually create a circle in the middle of my text. JSFIDDLE #about { height: 100vh; …
Shniper
  • 854
  • 1
  • 9
  • 31
0
votes
1 answer

How i can create hexagon shape with rectangle in background?

I create example like it was on picture(run code snipped in full screen), but i ask if its better way to do this. If i zoom webpage i see borders of shapes, so can i create hexagon in one object and add rectangle in background. Thanks for the advice…
0
votes
3 answers

Why shows up arrows with all the list element when i hover only one?

I have the following list, and I want an arrow to appear when I hover over a li. But, instead, the arrows appear with all the elements if I hover one of them. How can I make it only appear next to it which i hover? .years ul { list-style:…
vinya
  • 11
  • 4