In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the html how to set a tag location, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Setting method: 1, add "position: relative;" style to the parent tag of a tag for relative positioning; 2, add "position: absolute;" style to a tag for absolute positioning; 3, use top, bottom, left, right attributes to control the position of a tag.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
In html, you can use the position attribute to set the a tag location:
Add "position: relative;" style to the parent tag of a tag for relative positioning
Add "position: absolute;" style to a tag for absolute positioning
Use the top, bottom, left, right attributes to control the position of the a tag.
Div {width: 300px; height: 200px; background-color: yellow; position: relative;} a {position: absolute Top: 50px; left: 50px;} I am an a tag
Description:
The position attribute specifies the type of positioning method for an element (static, relative, absolute, or fixed).
Relative: a relative positioning element is generated and positioned relative to its normal position. Therefore, "left:20" adds 20 pixels to the LEFT position of the element.
Absolute: an element that generates absolute positioning, relative to the first parent element other than static positioning. The location of the element is specified by the "left", "top", "right", and "bottom" attributes.
Thank you for reading this article carefully. I hope the article "how to set a tag location for html" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.