Some basic things of CSS

Source: Internet
Author: User
1. CSS import:
First, put the CSS document in the <Style type = "text/CSS"> ...... </Style>
In <style>, "type = 'text/CSS '" indicates Code Is to define the style form.

The second method is to write the CSS style sheet in the HTML row, for example, the following code:
<P style = "font-size: 14pt; color: Blue"> Blue 14 text </P>
The style is written in any row in HTML in the format of <style = "">, which is convenient and flexible.

The third method is to save the edited CSS document as a ". CSS" file and define it in <Head> <LINK rel = stylesheet href?“style.css "> ...... </Head>
We can see that a <link> is applied here. "rel = stylesheet" indicates that the connected element is a style sheet document. Generally
You do not need to change it.
The subsequent href='style.css 'refers to the file address to be connected. You only need to write the detailed path name of the edited ". CSS" file
You can. This method is suitable for defining multiple documents at the same time. It allows multiple documents to use the same style at the same time, thus reducing a large amount of redundancy.
Code.

Fourth, <! -- # Include file = "/temp/CSS. aspx "-->, put it in > ...... </Style>.
2. I learned a new trick on the internet today to make the widget color gradient.
<Style type = "text/CSS">
<! --
. Test {filter: progid: DXImageTransform. Microsoft. gradient (startcolorstr = 'white', endcolorstr = 'red', gradienttype = '1 ');}
-->
Startcolorstr is the start color, endcolorstr is the end color, gradienttype, 0 is from top to bottom, 1 is from left to right
3. Oh, and,
. Tableborder
{
/* This is the User-Defined selector. Pay attention to the above. This is the user-defined method! */
Background-color: # e1fdee;/* Background Color */
Border: 1px solid # ff0000;

}
When you call a custom selector, you only need to add class = tableborder to its HTML Tag (the name of your custom selector.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.