CSS folding Style (2)--Define style sheet

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

&LT;!DOCTYPE&NBSP;HTML&GT;&LT;HTML&GT;&LT;HEAD&GT;&NBSP;&NBSP;&NBSP;&NBSP;&LT;TITLE&GT;CSS Style Use </title>     <meta charset= "Utf-8" >    <link rel= "stylesheet " type=" Text/css " href=" Style.css ">


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 to change yellow */a:visited {color:blue;}/* Mouse  Click here to change the 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 */


This article is from "Sour milk" blog, please make sure to keep this source http://wengmengkai.blog.51cto.com/9016647/1825581

CSS folding Style (2)--Define style sheet

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.