HTML CSS examples for CSS Widget:Border Style
Add border only to Corner
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .box {<!--from w w w . j av a 2s . c o m--> position: relative; overflow: hidden; box-shadow: inset 0px 0px 0px 10px green; padding: 2em; } .box:before { content:''; display: block; position: absolute; border-top:10px solid white; border-bottom:10px solid white; height:calc(100% - 20px); top:0; width: calc(100% - 36px); left:18px; } .box:after { display: block; position: absolute; content:''; border-right:10px solid white; border-left:10px solid white; height:calc(100% - 36px); width: calc(100% - 20px); top:18px; left: 0; } </style> </head> <body> <div class="box"> Corner borders </div> </body> </html>