• Final width calculation of sub elements in flex layout


    I used to have a colleague who liked to use it in layoutflexLayout, can use flex, he uses flex, and he is using itflexI always like the layoutLayout of side gateIt’s hard to figure out the final width of elements, such as: .box{ display: flex; width: 600px; height: 300px; } .box .left { flex: 1 […]

  • CSS page layout waterfall flow layout


    First of all, let’s take a look. What is waterfall? Waterfall flow, also known as waterfall flow layout. It is a popular web page layout. The visual performance is uneven multi column layout. As the page scroll bar scrolls down, this layout will continue to load data blocks and attach to the current tail. For […]

  • Flex layout width calculation


    The flex flexible layout of CSS is widely used in the daily development. The flexibility of its flexible expansion provides convenience for the development of responsive requirements. Grid layout, vertical center and so on. After setting the flex layout and adding several attributes, it can be easily realized. Basic use can be referred toTeacher Ruan’s […]

  • Golang string formatting


    golang format In go language, fmt.Sprintf (), fmt.Printf (), fmt.Fprintf (), Log.Printf (), log.Panicf () and other functions often use string to format parameters. This article will familiarize you with all parameters. Parameter introduction Verbs Function %v Output according to the original value of the value %+v Expand the structure field name and value based […]

  • TD content wrap table TD too many text wrap after setting width


    Set the style of table- layout:fixed; “Then set TD’s style =” word- wrap:break-word; “Yes Copy code The code is as follows: <table style=”TABLE-LAYOUT: fixed” border=”1″ cellspacing=”0″ cellpadding=”0″ width=”200″> <tbody> <tr> <td style=”WORD-WRAP: break-word” width=”20″>sssssssssssssssssssssssssssssssssssssssssssssss </td> <td>aaaaa</td> </tr> <tr> <td style=”WORD-WRAP: break-word” width=”20″>sssssssssssssssssssssssssssssssssssssssssssssss </td> <td>aaaaa</td> </tr> </tbody></table>

  • Mobile terminal rem.js


    Rem is only related to the font size of HTML, such ashtml{font-size: 16px} body{font-size: 62.5%}So 1rem is still 16px, nothing else The following JS is introduced into the header, and the font size of HTML is automatically set according to the screen width. If the design drawing is 750px wide, 100px on the design drawing […]

  • Text centering method of CSS child element text length exceeding parent element width


    <span style=”display: inline-block;width: 50px;> <p style=”display: inline-block;white-space: nowrap;margin-left: 50%;transform: translateX(-50%);”> Huangpu Wahaha, lebes777, Wahaha, it’s a good district </p> </span> main points:1. The child element should be set to not wrap, and it is an inline block level element, so that the text has the actual width.2. Based on the 50% width of the parent […]

  • Record a JS image compression ideas


    Image compression using canvas Idea: create a canvas and draw the picture on the canvas,Adjust the image size by setting the width and quality of canvas Convert file to Base64 This step is to create an image and obtain the aspect ratio in the image //Convert file to Base64 function changeFileToBaseURL(file, fn) { var flieReader […]

  • What is the difference between int (10) and int (11) in MySQL?


    Recently, I am looking for a job, so I have been interviewing. In the process of interview, I have exposed a lot of shortcomings, and I have been summarizing and summarizing. Maybe most interviewers will ask questions about mysql, such as database optimization, master-slave replication, index, engine and so on. What impresses me most is […]

  • Elastic box flex box scroll bar principle, to avoid being stretched, never failure


    In HTML, to scroll the region content, you only need to set the width and height of the element, and then set the CSS property overflow to auto or scroll     In the flex box layout, sometimes the width and height of our content are variable and cannot be determined. At this time, setting […]

  • Learn to use min (), max (), clamp () in CSS and their usage scenarios


    Author: Ahmad shadedTranslator: XiaozhiSource: Sitepoint Like again, wechat searchGreat migration to the worldPay attention to this person who does not have a big factory background, but has an upward positive attitude. this paperGitHub https://github.com/qq44924588…It has been included in the book, the articles have been classified, and a lot of my documents and tutorial materials have […]

  • Learning notes V2 of mobile terminal adaptation scheme based on VW unit


    Reference article Mobile front end adaptive solutions and comparison Length in CSS IOS adaptability and layout Briefly describe the requirements: first of all, the traditional mobile terminal is adaptive, that is, whether it is a large screen or a small screen mobile phone, you should see the same typesetting, just scaling according to the screen […]