• Decomposition of HTML + CSS floating ad bar


    1. HTML part Copy code The code is as follows: <!DOCTYPE html> <html> <head> <title>blog_floatdiv.html</title> <meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″> <meta http-equiv=”description” content=”this is my page”> <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″> <!–<link rel=”stylesheet” type=”text/css” href=”./styles.css”>–> <link rel=”stylesheet” type=”text/css” href=”./css/blog_floatdiv.css”> <script type=”text/javascript” src=”./js/jquery-1.9.1.js”></script> <script type=”text/javascript” src=”./js/blog_floatdiv.js”></script> </head> <body> <div> I am a floating div < img SRC = “images/ […]

  • The usage of float floating in HTML / CSS


    1、 Examples of basic usage of float 1. We first build two div boxes and set the height, width and background color; The location of the first two boxes on the web page is as follows: Then we float the red box to the right Then we can see that the red box floats to […]

  • Explanation of CSS floating property


    1、 What is floating? Floating, as the name suggests, is floating. It refers to the phenomenon that an element breaks away from the document flow and is suspended above the parent element. 2、 How to generate floating? Add a float attribute to the element itself Float value: left The element floats to the left. right […]

  • CSS clear floating and BFC method


    BFC BFC: block level formatting context Layout rules of BFC The inner box will be placed vertically, one by one. The vertical distance of box is determined by margin. The margin of two adjacent boxes belonging to the same BFC will overlap. When calculating the height of BFC, floating elements also participate in the calculation. […]

  • Detailed explanation of the calculation accuracy of double / float data in IOS


    1. Our app has a judgment that when the value entered by the user is less than or equal to the remaining balance, it will pop up the window for the user and the code will not be executed further When the user enters 0.01, the result of Po is: 0.10000…. when the user’s balance […]

  • CSS uses placeholder show pseudo class to realize floating text effect of input box


    In this article, we will use the: placeholder show pseudo class to create a floating problem tag effect, which is implemented in pure CSS.   Floating text label When we deal with input boxes, we try to provide users with a better experience. There are two tag attributes that we often use: A label label […]

  • The realization code of HTML floating prompt box function


    General form prompts always occupy the position of the form, making the side of the form longer or wider, affecting the layout. However, if the prompt box floats beside the required content like a dialog box, this problem can be solved. HTML and styles Make a form first <div id=”form-block”> <h1>Registration</h1> <form id=”form-form” class=”center-block”> <div> […]

  • Two ways to clear floating HTML


    1、 Clear floating mode 1 Set the height for the previous parent element. Note: in enterprise development, you can write no height without writing height   <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>D131_ClearFloat</title> <style> .smallbox1{ width:100px; height:100px; background-color: red; boder:3px solid black; margin:5px; float:right; ​ } .smallbox2{ width:100px; height:100px; background-color: red; boder:3px solid black; […]

  • What is BFC? CSS using pseudo elements to clear floating


    BFC concept: Block level formatting context is an independent rendering area, which isolates the elements inside BFC from the elements outside, so that the positioning of the elements inside and outside will not affect each other. Let’s first understand a noun: BFC (block formatting context), which is “block level formatting context” in Chinese. First of […]

  • Talking about the Characteristic of CSS Floating


    This paper introduces the characteristics of CSS floating, share it with you, and leave a note for yourself by the way. Floating has the following characteristics: Uncovered Text Floating elements are not followed by block-level elements, and the latter elements will be side-by-side with it (unless the width of the element is set and the […]

  • Solution to the problem of abnormal line change in CSS float left layout


    Recently encountered a page layout problem, and then simulated the reasons for the following. The layout that was supposed to be realized is probably like this. As a result, this happened. The HTML of the page is like this <div class=”block”> <div></div> </div> <div class=”block”> <div></div> </div> <div class=”block”> <div></div> </div> <div class=”block” > <div […]

  • Overview of Floating and Clearing Floating in Pages


    First, float: The main purpose is to achieve the effect of text winding pictures. It’s also the easiest way to create a multi-column layout. <img src= “ ” /> <p> Text Content Paragraph Content Paragraph Content Content Paragraph Content Text Content Paragraph Content Paragraph Content Text Content Paragraph Content Text Content Paragraph Content Paragraph Content</p> […]