


What is the relationship between the div floating layer and the default div layer?
Speaking of FloatingFirst of all, we need to understand a concept, why do we set the floating style? Because I want the DIVObject box to be laid out left or right. In this way, our web pages can be more beautiful and interactive. So what is the difference between floating DIV and default DIV? Let’s take a look at
What is the difference between div floating layer and div layer? What is the relationship in css
First of all, DIV floating layer and DIV layer both refer to DIV layout. Generally, CSS style sheets are used to add DIV tag combinations are used to lay out web pages.
The div layer generally includes a div floating layer. The div floating layer indicates that the div is added to the css floating style, so it is called a div floating layer. Without the float floating style, it does not have a floating effect, so If no floating style is added to the div, it is not called a floating layer. Of course, tags such as span, h1, ul, and li are also layers, but tags such as span, h1, ul, and li are not used as frequently as div, so div is generally used as a symbolic name.
Next, let me tell you what is a general layer and what is a floating layer? Why use div css floating layer.
The complete DIV+CSS example HTML code is as follows
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>div层与浮动层</title> <style> .div{ width:400px; height:100px} .div-a{ float:left; border:1px solid #F00; width:100px; height:80px} .div-b{ float:right; border:1px solid #00F; width:100px; height:80px} </style> </head> <body> <div class="div"> <div class="div-a"></div> <div class="div-b"></div> </div> </body> </html>
The object ".div" is not set to float, ".div-a" is set to float to the left (float:left), ".div- b" is set to float to the right (float:right).
Summary of layers and floating layers
In the above example, the ".div" object is a normal layer, and the default is a layer without floating effect, because the content of the web page is on the left. You can see that this layer is on the left. It is actually a DIV box layer without floating style. The children ".div-a" and ".div-b" within the object are set to float, so they become floating layers. As can be seen from the above, one floats to the left and the other floats to the right in the ".div" box. . The difference between a normal layer and a floating layer is whether the CSS float style is set.
The differences in floating have been introduced to you very clearly. For more exciting information, please pay attention to the php Chinese websiteOther related articles!
Related reading:
How to use the span tag in html
Scroll bar style setting for html
The above is the detailed content of What is the relationship between the div floating layer and the default div layer?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to set up keyboard startup on Gigabyte's motherboard. First, if it needs to support keyboard startup, it must be a PS2 keyboard! ! The setting steps are as follows: Step 1: Press Del or F2 to enter the BIOS after booting, and go to the Advanced (Advanced) mode of the BIOS. Ordinary motherboards enter the EZ (Easy) mode of the motherboard by default. You need to press F7 to switch to the Advanced mode. ROG series motherboards enter the BIOS by default. Advanced mode (we use Simplified Chinese to demonstrate) Step 2: Select to - [Advanced] - [Advanced Power Management (APM)] Step 3: Find the option [Wake up by PS2 keyboard] Step 4: This option The default is Disabled. After pulling down, you can see three different setting options, namely press [space bar] to turn on the computer, press group

What graphics card is good for Core i73770? RTX3070 is a very powerful graphics card with excellent performance and advanced technology. Whether you're playing games, rendering graphics, or performing machine learning, the RTX3070 can handle it with ease. It uses NVIDIA's Ampere architecture, has 5888 CUDA cores and 8GB of GDDR6 memory, which can provide a smooth gaming experience and high-quality graphics effects. RTX3070 also supports ray tracing technology, which can present realistic light and shadow effects. All in all, the RTX3070 is a powerful and advanced graphics card suitable for those who pursue high performance and high quality. RTX3070 is an NVIDIA series graphics card. Powered by 2nd generation NVID

In iOS 17.2, Apple lets you customize the sound your iPhone uses for default notifications. This is good news for anyone who doesn't like the "bounce" tone Apple is introducing in iOS 17. In previous iOS versions, Apple allowed users to choose ringtones and text tones, as well as custom alert sounds for email, calendar, and reminder alerts. Anything else that throws notifications uses the default sound, and there's no way to change it. In iOS17, Apple subsequently changed the original default alert sound from "Tri-tone" to "Rebound". Many users didn't like the change, and some thought the new sounds were harder to hear. Therefore, the default sound in iOS17.2 is changed to your

Which tablet is suitable for musicians? The 12.9-inch speaker in Huawei’s iPad is a very good product. It comes with four speakers and the sound is excellent. Moreover, it belongs to the pro series, which is slightly better than other styles. Overall, ipad pro is a very good product. The speaker of this mini4 mobile phone is small and the effect is average. It cannot be used to play music externally, you still need to rely on headphones to enjoy music. Headphones with good sound quality will have a slightly better effect, but cheap headphones worth thirty or forty yuan cannot meet the requirements. What tablet should I use for electronic piano music? If you want to buy an iPad larger than 10 inches, I recommend using two applications, namely Henle and Piascore. Provided by Henle

What driver is good to install on rx5808g? 20.5.1 and 20.4.2WHQL refer to the version number of the software or driver. These version numbers are typically used to identify updates or fixes to software or drivers. In the computer world, WHQL stands for Windows Hardware Quality Labs, which is an institution used by Microsoft to test and verify the compliance and stability of hardware and drivers. Therefore, 20.5.1 and 20.4.2WHQL indicate that these software or drivers have passed Microsoft's testing and verification and can be safely used in the Windows operating system. AMDrx580 graphics card relatively stable drivers 20.5.1 and 20.4.2WHQL refers to the version number of the software or driver. These version numbers are passed

What games can be played with i34150 with 1G independent graphics? Can it play small games such as LoL? GTX750 and GTX750TI are very suitable graphics card choices. If you just play some small games or not play games, it is recommended to use the i34150 integrated graphics card. Generally speaking, the price difference between graphics cards and processors is not very big, so it is important to choose a reasonable combination. If you need 2G of video memory, it is recommended to choose GTX750TI; if you only need 1G of video memory, just choose GTX750. GTX750TI can be seen as an enhanced version of GTX750, with overclocking capabilities. Which graphics card can be paired with i34150 depends on your needs. If you plan to play stand-alone games, it is recommended that you consider changing the graphics card. you can choose

In the process of using the Windows 10 operating system developed by Microsoft, many users are curious and confused about the new technology called Cortana. Cortana's official name in the Chinese context is "Cortana", which is actually a built-in function of the Windows 10 system. Cortana, an artificial intelligence (AIassistant) service program. Frequently asked questions and solutions. How to open Cortana and not respond. Solution steps. Chinese solution is not supported. How to put the search box into Cortana. What software is Cortana? Answer: "Cortana" It is a cloud platform personal intelligent assistant carefully built by Microsoft. It has two usage modes: login and non-login. When you are logged in

The C library memory allocation function void*calloc(size_tnitems,size_tsize) allocates the requested memory and returns a pointer to it. The difference between malloc and calloc is that malloc does not set the memory to zero, while calloc sets the allocated memory to zero. Memory Allocation Function Memory can be allocated in two ways as mentioned below - Once memory is allocated at compile time, it cannot be changed during execution. There will be problems of insufficient or wasted memory. The solution is to create memory dynamically, that is, create memory according to the user's requirements during the execution of the program. The standard library functions for dynamic memory management are as follows: -malloc()calloc()realloc()free
