CSS folding Style (2)--defining style sheets

Source: Internet
Author: User

The first style sheet is available (1) embedded style sheet (2) Introduction style sheet, two ways to achieve,
I'll put this in the form of code below:
(1) Embedded style sheet
Demo.html

<!doctype html> 

(2) Introduction style sheet
demo.html

<!doctype html> 

Style.css

body{      Background-color:yellow;      Color: #fff    }    p,h1,h2,.p1, #pid {color:red;font-size:20px;}  /* Combo Style definition */    a:link {color:red;}   /* Show Red */  a:hover {color:green;}/* Mouse move to green */  a:active {color:yellow;}/* Mouse click the time when yellow */  a:visited {Colo R:blue; }/* The mouse click on the place to change to blue *    /div{background:red;font-size:20px}  /* HTML style definition   *  /. Div1{background-color: green;font-size:20px;}  /* Class Style definition   */  #divid {background-color:blue;font-size:20px;}  /* ID Style definition   */

The above is the CSS folding style (2)-Define the content of the style sheet, more relevant content please follow topic.alibabacloud.com (www.php.cn)!

  • 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.