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