Are there some way to put css inside html? -


this question has answer here:

are way put css inside html?, mean example selectors "before:" , "after:"

<div id="foto" style="position: relative; margin: 20px auto: with: 500px;heght:200px......"> <img src="imgt/big.jpg" width="500px" height="200px"> </div> 

and file css

#foto{ position: relative; margin: 20px auto; width: 500px; height: 200px; padding: 10px; border: 1px solid #ccc; background: #eee; } #foto:before{ content: ""; position: absolute; z-index: -1; left: 10px; bottom: 15px; width: 50%; height: 20%; box-shadow: 0 15px 10px rgba(0,0,0,0.7); -webkit-transform: rotate(-3deg); } #foto:after{ content: ""; position: absolute; z-index: -1; left: 250px; bottom: 15px; width: 50%; height: 20%; box-shadow: 0px 15px 10px rgba(0,0,0,0.7); -webkit-transform: rotate(5deg); 

}

you can use inline style have used div. why need ? better practice keep css in separate file.

as zenith said can't use pseudo-element in inline style. see this


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -