div{
-webkit-box-shadow:inset 0px 0px 0px 10px #f00;
-moz-box-shadow:inset 0px 0px 0px 10px #f00;
box-shadow:inset 0px 0px 0px 10px #f00;
}
.inner-border {
border: 4px solid #e5621a;
border-radius: 9px;
box-shadow: inset 0px 0px 0px 1px white;
box-sizing: border-box; /* Include padding and border in element's width and height */
}
//make sure background and border color are same with different box-shadow.
<button className="bg-[#e5621a] p-4 inner-border">Inner border</button>
div {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 100px;
height: 100px;
border: 20px solid #f00;
background: #00f;
margin: 10px;
}
div + div {
border: 10px solid red;
}
Code Example |
---|
Css :: css background properties |
Css :: css ie11 only |
Css :: width defined by content css |
Css :: css break wrap header |
Css :: hide overflow but still scroll |
Css :: how to justify text in css |
Css :: how to create space inbetween text css |
Css :: css box shadow from all sides |
Css :: how to round the edges of a box html |
Css :: css space between child elements |
Css :: css mobile height 100vh |
Css :: css light grey |
Css :: css text alignment |
Css :: space between text css |
Css :: jquery hover class css not working |
Css :: how to make div position top in css |
Css :: css focus border radius |
Css :: html file upload without browse button |
Css :: backdrop css |
Css :: nodelist map |
Css :: css wrap |
Css :: iconscout css |
Css :: drawing a circle with css |
Css :: sass import variable from another file |
Css :: grid css |
Css :: css curved border |
Css :: display sm none |
Css :: show icon on hover css |
Css :: css word break |
Css :: input type (submit, button, reset) css |