CSS naming conventions commonly used in CSS naming conventions

Source: Internet
Author: User

CSS naming conventions commonly used in CSS naming conventions

Head: Header

Content: Content/container

Tail: Footer

Navigation: Nav

Sidebar: Sidebar

Column: Column

Page perimeter control overall layout width: Wrapper

Middle: Left Right center

Login Strip: Loginbar

Logo: Logo

Ad: Banner

Page body: Main

Hotspot: Hot

Press: News

Download: Download

Sub-navigation: Subnav

Menus: Menu

Sub-menu: submenu

Searches: Search

Links: Friendlink

Footer: Footer

Copyrights: Copyright

Scrolling: Scroll

Contents: Content

Tabs page: Tab

Article List: List

Hint Message: MSG

Tip: Tips

Column Title: Title

Join: Joinus

Guide: Guild

Services: Service

Registration: Regsiter

State: Status

Vote: Vote

PARTNER: Partner


CSS syntax

RowSpan cross-column colspan across rows
<input type= "number" name= "points" min= "0" max= "ten" step= "3"/>
<input type= "file" Name= "img" multiple= "multiple"/>

<form action= "demo_form.asp" method= "Get" novalidate= "true" >
<input type= "Email" name= "User_email"/>
<input type= "Submit"/>
</from>

<input type= "Search" name= "User_search" placeholder= "Search W3school"/>

Box model contents content border distance padding boundary border margin margin

<script type= "Text/javascript" >
var C=document.getelementbyid ("Mycanvans");
var Cxt=c.getcontext ("2d");
Cxt.moveto (10.10);
Cxt.lineto (150.50);
Cxt.lineto (10,50);
Cxt.stroke ();
</script>

<canvas id= "MyCanvas" width= "" "height=", "style=" border:1px solid #c3c3c3; >
Your Broser does not support the canvas element.
</canvas>

CSS: Selector Property values
Selector{property:value}
Body{color:blue}

JQuery a JavaScript function library
<script type= "Text/javascript" src= "Jquery.js" ></script>
<script type= "Text/javascript" src= "Jquery.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("button"). Click (function () {
$ ("P"). Hide ();
});
});
</scrpit>

$ (selector). Action ()


J

JavaScript functions


Function name () {
function body; (code block)
}


Exception capture


try{
The code block in which the exception occurred;
}catch (Err) {
Error information processing;
}


JavaScript Events Event


Query element Selector
JQuery uses CSS selectors to select HTML elements.

$ ("P") select the <p> tag element.

$ ("P.intro") selects all the <p> elements of the class= "Intro".

$ ("P#demo") Select the first <p> element of id= "demo"

CSS naming conventions commonly used in CSS naming conventions

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.