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

How to realize the DIV float of the front end

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article focuses on "how to achieve the front-end DIV floating", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn how to achieve the front-end DIV floating bar!

Block-level elements can be floated left and right, the purpose is to let DIV achieve similar table rows and columns horizontal and vertical rows, floating other block elements will occupy the original position (impact on the following elements). If you don't want to float later, you can clear the float (clear the influence of other people's float on me!) Clear:left right both .

Note:

1. When floating, set a wide height to control the position, and generally cooperate with the margin!

2. DIV itself floats, and internal nested DIV should also float!

Hyperlink pseudo-class:

A selector: link {} normal style

A selector: hover {} hover style

A selector: active {} style when clicked

A selector: visited {} after clicking the style, the color setting does not take effect, just clear the browser cache.

.a1: link {

Color:red

Text-decoration:none

}

.a1: hover {

Font-size:36px

Color:green

}

.a1: active {

Color:blue

Font-size:12px

}

.a1: visited {

Color:gray

}

Click on the right surprise

At this point, I believe you "how to achieve the front-end DIV floating" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue 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