tags: HTML\CSS css html html5 css3





3.1 The problem of element width How to build the following simple web page? Write HTML first Write basic style CSS code Explain that because IE has a bug, it will default to<main>Elements are r...
4.5 Grid System The reusability of code can be improved with the help of grid system The grid system provides a series of class names that can be added to the markup to structure a part of the web pag...
Element spacing in the container Add two social buttons to the sidebar Set the size, font, and color of the sidebar buttons At this time, they are stacked directly on top of each other without margins...
5.1 Principles of Flexbox Add to the elementdisplay:flex, The element becomes aFlexible container(Flex container), its direct child element becomesElastic sub-element(flex item) The height of the elas...
Custom attributes Declare a variable, assign a value to it, and then refer to this value elsewhere in the style sheet, which can reduce duplication in the style sheet example: Define a custom attribut...
If an attribute of an element does not have a cascading value, it may inherit the value of an ancestor element Properties that can be inherited Text-related attributes color, font, font-family, font-s...
2.3 Stop pixel thinking Inverse mode: global reset font-size is 10px (from the default font size 16px to 10px, easy to calculate the value of the REM) Disadvantages: Need to write a lot of repetition ...
Box model and border-box When specifying the width or height of an element, the size of the element content is set - any inner margin (padding), border, the outer distance (margin) is superimposed bas...
Chapter One 1. The difference between declarations and definitions Statement multiple times, only once defined, allocated memory is defined at the same time. 2.static Modifying variables: Static globa...
5.2 The size of the elastic child element The flex attribute controls the size of the elastic child element in the main axis direction Set the main container to Flexbox Use the flex attribute to set t...