Style an image by its CSS property - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Style an image by its CSS property

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
img[width='250'] {
   margin:100px;
}
</style> <!--  w  ww  .  ja  va 2s  .  c  o m-->
 </head> 
 <body> 
  <img src="https://www.java2s.com/style/demo/Opera.png" width="250">  
 </body>
</html>

Related Tutorials