Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does the CSS style property Left mean

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what the CSS style attribute Left means, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.

Usually, it is not effective for left to set equipment in CSS, and it has to be used under the position attribute to be persuasive. The influence of left on the left at several intervals (how far away from the left).

Left

I. left familiarity and Grammar

Left translation: left, left

There is no intention to configure left occasionally in the CSS selector code. If you set the distance between the left and the left of the equipment installation object box, you need to set the position setting and then set the left development object to the left.

1. Instructions for use

Assuming that it is useful to configure left for the box object alone, you need to set the equipment position:relative outline position:absolute at the same time.

2. Grammar

The left value can be positive, positive, or percentage.

Left:10px

Left:-20px

Left:12%

The above detailed values are positive, negative and percentage values.

3. Typical use of css left

.abc{ left:10px;position:relative} or .abc{ left:10px;position:absolute}

Configure 10px to the left of the class=abc object box

.abc{ left:-10px;position:relative} or .abc{ left:-10px;position:absolute}

Configure class=abc object box to the left-10px

.abc{ left:10%;position:relative} or .abc{ left:10%;position:absolute}

Set equipment and equipment class=abc object box 10% to the left

4. Compatibility

Compatible with all major hunting machines.

2. Small instance of left

Here with the use of position, look at the role of left.

1. Div css instance code

Css left instance effect CSS5.box {width:300px;height:300px; border:1px solid # 00F} .pr {position:relative; border:1px solid # 000; width:100px; height:50px} .p1 {left:10px;border:1px solid # F00} / * Blood Box * / .p2 {left:30px;border:1px solid # 0F0} / * Green Box * / .p3 {left:60px;border:1px solid # 0FF} / * Sky Blue Box * / .pwu {left:10px; width:100px Height:50px;border:1px solid # F0F} / * Purple Box * / form 1 Mode 2 content 3 position is not set

2. Screenshot of the result

Thank you for reading this article carefully. I hope the article "what is the meaning of CSS style attribute Left" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report