CSS style control picture trim display

Source: Internet
Author: User
Tags definition trim
css| Control | show

When we were in the Forum news system, some of these pictures will be relatively large damage to the overall layout of the beautiful, is now through the definition of CSS to make the picture trimmed display, that is, when the picture of the container is not enough to display the entire picture, will be in the upper left corner of the beginning to show that the show will be hidden. Relevant colleagues also have this idea. The following CSS styles are available, so post them for sharing with Web developers!

Of course, some people use the onload event of IMG to its wide and high JS control, but the recruit sometimes because of the Web page load too fast, or too slow to execute, is to recommend the code as follows, their own research.

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
. Divclass{height:100%;width:100%;overflow:hidden; MARGIN-BOTTOM:5PX}
</style>
<title>copy data to ID cluster by ID | Picture CSS definition Trim Display | Width of text adaptive scaling </title>

<body >
<div id= "Airzen" class= "Divclass" ></div>
</body>

Description: You can define the above style, but keep the Overflow:hidden; Wish you all a happy work!



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.