Home > Web Front-end > HTML Tutorial > How to know what CSS property style to set for DIV?

How to know what CSS property style to set for DIV?

php中世界最好的语言
Release: 2017-11-22 17:40:32
Original
2151 people have browsed it

How to know what CSSpropertiesstyle to set for DIV? Usually we have to consider three aspects to make a comprehensive judgment. There are no artistic drawings, there are artistic drawings, and combined with peer websites, I will give you a detailed introduction below.

What CSS style to set is not a matter of imagination but a reference. Generally, there are three situations where you need to know what style to set.

The first type: There is no artwork, and you think about the layout by yourself

In this case, there is no artwork and no reference for DIV CSS layout, and you layout and set the CSS according to your actual ideas. , for example, when laying out the left and right structures, set float:left and float:right to realize that object is left and right, and then think about the left and right layout width. How much, and then set the width style.

In this case, it is slow to lay out the web page. You may want to think about the layout a little bit. You may want to achieve the ideal aesthetic effect after the layout is successful. You may constantly modify the CSS style parameters to adjust the details. This is more time-consuming, but it is also You can know what CSS styles you want to lay out.

Second type: View other people’s website webpages for layout

In this case, if there is no artwork, but you want to have the same (or partially the same) layout as other people’s webpages, you should use the reference at this time Take the website as the object, observe or analyze the width of the other party's website, whether it has borders, background styles and other styles, and set the layout and CSS according to the analyzed or obtained styles. Of course, if you know how to analyze the other party's code (html and css), you can directly copy the other party's corresponding code and use it.

Third type: CSS layout web page with artwork

It is easier to determine CSS style with artwork than othertwo layouts, everything needs to be set. Including style values ​​​​can be analyzed and obtained from the artwork.

For example, when setting the font color, you can intuitively see that you need to set the font color style, and obtain the corresponding color value of the artwork through the software, and you can lay out the required css font color.

Having said so much, everyone should know how to judge, so for more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Scroll bar style settings in html

How to view the web page source code in html

HTML web page font size setting


The above is the detailed content of How to know what CSS property style to set for DIV?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template