Table of Contents
Basic knowledge of css
Selector usage css
Priority in css
Commonly used styles in css
页面布局
我们先看看中间的变化:
一类是中间内容的菜单和内容都不动,右边内容多的时候出现滚动条
还有一类是中间内容部分如果多了,我们让左边的菜单跟随滚动条:
我们再看看头部的变化:
Home Web Front-end JS Tutorial Basic knowledge about front-end css

Basic knowledge about front-end css

Mar 19, 2018 am 11:02 AM
css basic knowledge

This time I will bring you the basic knowledge of CSS on the front-end. What are the things to note about the basic knowledge of CSS on the front-end? The following is a practical case, let’s take a look.

Basic knowledge of css

Let’s look at a small example first:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="UTF-8">
    <title>Title</title></head><body>
    <p style="background-color:#2459a2;height: 48px;">1</p>
    <p style="background-color:red;">2</p>
    <p style="background-color:green;">3</p></body></html>
Copy after login

We can see that we added style to p, There are background-color, height and other attributes in it, so that the background color, height, etc. are added to p that originally has nothing.

Css writing

  • Set the style attributes on the tag: width, height, background....

  • Write in the head, write a