CSS positioning component CSS positioning method

Source: Internet
Author: User
Tags relative web database
CSS in the HTML and can not directly define the text to be displayed or the image of the picture file in that position ...
Only one order to show ...
But CSS offers 3 new properties to use.
Top,left,position ...
Left equals the x-axis, top equals the y axis, and position is either absolute (abslute) or relative (relative) position.
As an example:
<meta content= "text/html; Charset=big5 "http-equiv=content-type>
<title></title>
<body>
<div style= "position:relative;top:250;left:250" > displayed at (250,250) location
<div style= "position:relative;top:50;left:50" > Show at (300,300) position </div>
</div>
</body>
Position the above one object to judge, if relative will refer to the position of the previous object to show ...
Absolute is based on (0,0) as the benchmark.

In addition, CSS also has a z-index nature ...
This property is like the z axis, you can make the page has three-dimensional sense, or to say that there is a level of feeling ....
Set value by -2|1|0|1|2 (remember correctly)
The smaller the number means the lower ....

Usage is as follows:

<meta content= "text/html; Charset=big5 "http-equiv=content-type>
<title></title>
<style>
. style5 {color:black;
font-size=42pt;
Font-style:italic;
font-family: "Bart normal";
Position:absolute;
z-index=0;
top:265;
left:182;
width:450;
height:80;
}
. style7 {font-size=11pt;
Font-style:italic;
Color:white;
font-family: "Arial Black";
Position:absolute;
top:305;
left:440;
z-index=2;
width:280;
height:60;
}
</style>
<body>
<div class= "Style5" ><b>dhtml@ asp</b></div>
<div class= "Style7" ><span style= "font-size=22pt" > Asp </span>web Database </div>
</body>

For example, you can see two lines of text with the top and bottom points ....
Because the Z-index one setting is 0, the other is 2 ....

For CSS positioning method set is probably the case ...
These examples are available on my Web page .... Interested to see ...
If the above content is wrong or if there is a problem.
welcome you mail to me ...

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.