Get the App
SLTechnology News&Howtos  ›  Development  › 

What does the CSS style property Left mean

Shulou Source: shulou.com Published: 2022-06-01 10:47:16 10月18日 Update

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!

Tags: Boxes objects furnishings articles configurations properties at the same time examples requirements meaning styles codes values percentages syntax effectiveness value functions instructions for use interests Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology macOS Linux Redmi