By default, background properties are tiled, and if the background picture is larger and box is small, you can only display the background in the upper-left corner. If you want the background to be all displayed,
The code is as follows |
Copy Code |
. color_checked { Float:right; width:16px; height:16px; Background:url (.. /images/color_check.png) Center 0 no-repeat; -webkit-background-size:cover; -moz-background-size:cover; -o-background-size:cover; Background-size:cover; } |
If you still want the picture to be scaled automatically
The code is as follows |
Copy Code |
#blogcon img {max-width:400px max-height:400px; width:expression (this.width>400 && this.width> This.height? 400:true); Height:expression (This.height > 400:true); }
|
The meaning of this passage is explained: The maximum width of the IMG label for all images below the ID Blogcon label is set to 400px, the maximum height is 400px, and the width is scaled proportionally if the picture width and height are greater than 400.
Original from: Application Development Notes