Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Do not leave a space between attribute values and units in css

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces that there is no space between the attribute value and the unit in css. The introduction in this article is very detailed and has certain reference value. Interested friends must read it!

Do not leave a space between the attribute value and the cell. If you use "margin-left: 20px" instead of "margin-left: 20px", it only works in IE 6, but it doesn't work in Mozilla/Firefox or Netscape.

Internal pattern table

When a single document requires a special pattern, an external pattern table should be used. You can use tags to define internal pattern tables in the head of the document, like what:

Hr {color: sienna;} p {margin-left: 20px;} body {background-image: url ("images/back40.gif");} inline style

Inline fancy can damage many of the advantages of getting fancy tables because of the need to combine exposure with content. Use this method with caution, for example, when the trick needs to be applied only once to one element.

To use the inline format, you need to use the style attribute within the relevant tag. The Style attribute can include any CSS attribute. This example shows how to change the hue and left margin of a paragraph:

This is a paragraph

The above is all the contents of the article "Don't leave spaces between attribute values and units in css". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report