Use of the CSS style ASP.

Source: Internet
Author: User

1 using the link tag to invoke the style, that is, call the CSS file style, you can directly drag the CSS file to the HTML page under the head

This method loads the CSS first, then loads the HTML


2 using the Style label


3 Import load, first load HTML, then load CSS

   <style type= "Text/css" >                @import url (' css/default.css ');           </style>

4 Use in Default.css

1 if the type of the control is write-only, the control that represents that type uses this style

2 If you want to set a style for a control using #

Give me a chestnut: Defaullt.css file

body {    padding:0px;    margin:0px;    width:960px;    Height:auto;    Display:block;    Margin-left:auto;    Margin-right:auto;   }        #p_Top {  width:100%;  height:80px;  margin:0 Auto;  Background-color:white;  Display:block;} #p_Mid {  width:100%;  Height:auto;  margin:0 Auto;  Background-color:white;  Display:block;  min-height:420px;} #p_Footer {    width:100%;    height:30px;} #Select, #Insert, #Delete, #Update {   width:90px;   Margin-left:auto;   Margin-right:auto;   height:90px;   font-size:15px;   BORDER:3PX solid #33CCFF;} #Select: hover, #Insert: hover, #Delete: hover, #Update: hover{     cursor:pointer;     Background-color: #33CCFF;}

5 You can use properties to load styles for controls

1 Use the style attribute to directly use the style= "Width:auto; Height:auto; Margin-left:auto; Margin-right:auto; "

2 Use class to invoke the style in head

3 using CssClass to invoke the style in head

<style type= "Text/css" >         . Bt      {           width:80px;           height:25px;           Border:none;      }              . Bt:hover       {           cursor:pointer;           Background-color: #33CCFF;       }              . Closed       {            border-style:none;            height:21px;            width:21px;            Background-image:url ('/images/closed.png ');            background-repeat:no-repeat;       }              . Closed:hover       {           cursor:pointer;       }        </style>

6 background Add style to foreground button

Bt. Attributes.CssStyle.Value = "Background-color:gray;";

7 can be used as an iterative notation

Represents the style of the Li under the UL under Set menu

#Menu ul li{width:100%;border:1px dotted gray;margin:0;padding:0;}
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.