HTML CSS examples for CSS Widget:Shape
Grid shape icon
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- w w w . j a va 2 s .co m--> width:21%; padding-bottom:21%; margin:6% 11%; background-color:Chartreuse; position:relative; float:left; } div:after,div:before { content:""; position:absolute; background-color:yellow; } .one:before,.two:before { margin:0 49%; width:5%; height:100%; } .one:after,.two:after { margin:49% 0; height:5%; width:100%; } .two:before { height:51%; bottom:0; } </style> </head> <body> <div class="one"></div> <div class="two"></div> </body> </html>