IMG Only shows part of the picture or CSS settings background picture only display picture specified area

Source: Internet
Author: User

17:14 2016/3/22
IMG Only shows part of the picture or CSS settings background picture only display picture specified area
background-position:100% 56%; Set the background picture to show which coordinate area of the picture, the top left corner is 0, 0 or 0%, 0%, the lower right corner is height and width, or 100%, 100%.
Clip:rect (300px 100px 300px 0px); Set an area of the display picture, which is the order of the upper right and bottom left

Part of the code:
<style type= "Text/css" >
Img
{
Position:absolute;
Clip:rect (30px 150px 200px 50px)
}
</style>

Reference: Http://www.w3school.com.cn/tiy/t.asp?f=csse_clip

Body
{
Background-image:url (' bgimage.gif ');
Background-repeat:no-repeat;
background-attachment:fixed;
Background-position:center;
}
Reference: http://www.zgguan.com/doc/w3c/css/pr_background-position.asp.htm


Please like:
For you to help please praise, please the top, not good please step------send people roses, hand to leave the fragrance!

IMG Only shows part of the picture or CSS settings background picture only display picture specified area

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.