Home > Web Front-end > JS Tutorial > Basic knowledge about front-end css

Basic knowledge about front-end css

php中世界最好的语言
Release: 2018-03-19 11:02:39
Original
1715 people have browsed it

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