Python:html+css (Position)

Source: Internet
Author: User

position_fixed fixed on a page

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Title</title>    <style>. Pg_head{Height:60px;Background-color:Black;Color: white;position:fixed;            /*Position Head Fixation*/Top:0; left:0; right:0;        }. Pg_body{Background-color:#dddddd;Height:5000px;Margin-top:20px;        }    </style></Head><Body><!--Position Fixed -<Divclass= "pg_head">Head</Div><Divclass= "pg_body">Content</Div></Body></HTML>
position_fixed Fixed on a page

combination of relative and absolute in position

<!DOCTYPE HTML public "-//w3c//dtd HTML 4.01 transitional//en" "http://www.w3.org/TR/html4/loose.dtd "><HTML><Head>    <title>Title</title></Head><Body> <Divstyle= "position:relative;width:500px;height:200px;border:1px solid red;margin:0 auto;">        <Divstyle= "position:absolute;left:0;bottom:0;width:50px;height:50px;background-color:black;"></Div>    </Div>    <Divstyle= "position:relative;width:500px;height:200px;border:1px solid red;margin:0 auto;">        <Divstyle= "position:absolute;right:0;bottom:0;width:50px;height:50px;background-color:black;"></Div>    </Div>    <Divstyle= "position:relative;width:500px;height:200px;border:1px solid red;margin:0 auto;">        <Divstyle= "position:absolute;right:0;top:0;width:50px;height:50px;background-color:black;"></Div>    </Div></Body></HTML>
combination of relative and absolute in position

IE browser displays a picture with a blue border

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Title</title>    <style>img{Border:0;        }    </style></Head><Body><Div>    <!--The default img picture has a blue border, and if border:0, it can be Removed. -    <ahref= "http://www.baidu.com">        <imgsrc= "7.png"style= "width:820px; "alt= "mei"/>        <!--or -         <imgsrc= "7.png"style= "width:820px;border:0; "alt= "mei"/>    </a></Div></Body></HTML>
how to get rid of the blue border in IE browser display picture

Overflow picture shows incomplete, realistic scroll bar

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Title</title></Head><Body><!--<div style= "width:100px;height:100px overflow:hidden" > -    <!--hide the size of the picture by the size of the outside Overflow:hidden -    <Divstyle= "width:100px;height:100px; overflow:auto">        <!--picture size with scroll bar Overflow:auto -    <Div>        <a><imgsrc= "7.png"/></a>    </Div></Div></Body></HTML>
overflow picture shows incomplete, realistic scroll bar

Python:html+css (Position)

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.