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

How to write css external style sheet

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 "how to write css external stylesheets". In daily operation, I believe many people have doubts about how to write css external stylesheets. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to write css external stylesheets". Next, please follow the editor to study!

1. External style sheet:

two。 Internal style sheet:

……

3. Inline table

The css syntax consists of three parts: select {property: value}

If the value is more than one word, quote the value: P {font-family: "sans serif";}

Multiple declarations: P {text-align: center; color:red;}

Selector grouping: H2, h3, h4, h5, h6, h7 {color: green;}

Inheritance: body {font-family: Verdana, sans-serif;} all child elements inherit attributes from body

The first line of a.css: @ charset "utf-8"

Derived selector: li strong {… } used to select elements...

Id selector: # id1 {… }

Class selector:. Class1 {... }

Background color: background-color:gray

Background image: background-image:url (/ ab/cd/e.gif)

Duplicate background: background-repeat:repeat-x | repeat-y | no-repeat

Background location: background-position:center | top | bottom | right | left | 50% | 100px 200px

Background correlation: background-attachment:scroll | fixed | inherit

Inner margin: padding, padding-top, padding-right, padding-bottom, padding-left

Border: border, border-top, border-right, border-bottom, border-left, …

Outer margin: margin, margin-top, margin-right, margin-bottom, margin-left

Position: static, relative, absolute, fixed

Float: left, right

A:link {... }

A:visited {... }

A:hover {... }

A:active {... }

At this point, the study on "how to write css external stylesheets" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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