HTML page background settings related

Source: Internet
Author: User

<!DOCTYPE HTML><HTML>    <Head>        <MetaCharSet= "Utf-8">        <title>Background</title>                <style>Div{width:300px;Height:300px;Border:10px solid Red;Background-image:URL (https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1493309945592&di= b3051d0bce128fd8b75d9c0b9c2ee033&imgtype=0&src=http%3a%2f%2fpic67.nipic.com%2ffile%2f20150514% 2f21036787_181947848862_2.jpg);background-size:cover;            }            /*img{width:100%;            height:100%; }*/                    </style>    </Head>    <Body>        <!--If the container does not set the contents of a wide container, the container can be propped up but the background will not occupy the container's width and height . -    <Div>        <!-- -    </Div>    </Body></HTML>        <!--background background background-color background color background-image Background picture background-repeat background picture Repeat background-position background position background-attachment back Picture is scrolling -            <!--background-position:;                The two parameters representing X and Y can be transmitted directly to parameters such as background-position:10px 10px;                                You can also pass the keyword x keyword: center,left,right//, respectively, the middle, the left, the right y keywords are: top,center,bottom//respectively represents the top, the middle, the bottom If no parameter is passed, the default 0px 0px or left top -        <!--background-attachment:; Scoll Background scrolling (default property) fixed background -            <!--The background can also be written according to the compound attribute notation -        

HTML page background settings related

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.