Introduction to CSS
Learning the front-end must master the CSS
style, css
for cascading style sheets, to define the page display effect, enhance the user's experience fun, then how to use css
html
it?
Style Property Mode
Change the display style using the attributes in the tag style
<p style="background-color: #FFF000"> p标签</p>
head
Add tags to style
How to link
<link rel="stylesheet" type="text/css" href="head.css" media="screen" />
Summarize CSS
Selector name {
Property Name: property value;
.......
}
Separating attributes from attributes by semicolons
property is concatenated with the property value with a colon
Selector Selector
class
Selector Selector
id
Selector Selector
. Class
# ID
Htmlhtml
The code is not case-sensitive for Hypertext markup languages, which are defined by tags.
Head label
Commonly used in Labels:Font
<font size=5 color=red>标题标签:
List
<dl> <dt>名称</dt> <dd>Tom</dd> <dt>名称</dt> <dd>Tom</dd></dl>
<ol> <ul> <li>
Image
图像标签:图像地图:<map>
Form
表格标签:<table>标题<caption> 表头<th> 行<tr> 单元格<td>
<table border="1" width=”100%”> <caption>表格标题</caption> <tr algin=”center”> <th>姓名</th> <th>年龄</th> </tr> <tr algin=”center”> <td>dashucoding</td> <td>10</td> </tr></table>
Hypertext links
超链接<a href=””>定位标记<a href=”#标记”>
Form
- text box
text
- Password box
password
- Radio Box
radio
- check box
checkbox
- Submit button
submit
- Reset button
reset
- Button
button
- Image
image
JavaScript introductionJavaScript
is an object-based and event-driven scripting language that html
provides dynamic interaction for information, high security, and cross-platform capability. JS
is Object-based and is weakly typed.
Introduced:
JavaScript
embed script code in a HTML
document
<script language="javascript" type="text/javascript"> document.write("欢迎来到JavaScript世界!");</script>
<script language="javascript" src="javascript.js"></script>
<input type="button" name="mybtn" value="伪URL引入" onclick="javascript:alert('鼠标单击!')"> <script language="javascript" type="text/javascript">function clickme(){ alert("鼠标单击!");}</script><form name="myform"> <input type="button" name="mybtn" value="按钮" onclick="clickme()"></form>
Location of the script code
Place between marker pairs
<body></body>
Place between marker pairs
VariableVariable names begin with a letter or underscore ("_")
Variables can contain numbers, uppercase and lowercase letters from a to Z
JavaScript
Case sensitive
Declaration and assignment of variables
Define variable: var name;
Assignment: name = dashucoding;
Constant
- Integral type
- Floating point Type
- String type
- Data type
- Weak type, case sensitive
Numeric typeIntegral type, floating point type
String type
Single or double quotation marks
Boolean type
True, False
Null, undefined
OperatorArithmetic operators
+、-、 * 、 / 、%、++、--
Comparison operators
==、!=、>、>=、<、<=
logical operators
&&、||、!
Conditional operators
?:
Functionfunction 函数名(参数...){ 执行语句; return 返回值;}
Arrayvar arr = new Array();
for(var x=0; x<arr.length; x++){ alert(arr[x]);}
Looping statements
- For statement
- While statement
- for...in statements
- Interrupt Loop statement
for(初始化; 条件; 增量){ 语句;}
while(条件){ 语句; }
for(变量 in 对象){ 语句;}
Conclusion
- This article mainly explains? Front End Learning Path-CSS Introduction, HTML Introduction, JavaScript Introduction
- Below I will continue to
Java
,? Android
In-depth explanation of other knowledge, and interested to continue to focus on
- A little gift to walk or like.
Front End Learning Path-CSS Introduction, HTML introduction, JavaScript Introduction