笔记

来源:互联网 发布:linux 当前shell 编辑:程序博客网 时间:2024/04/30 23:10

Html5

 

1.      Select images: <inputtype="file" name="img" multiple="multiple" /> 用于上传文件 图片的标签

2. <formaction="demo_form.asp" method="get"novalidate="true">

E-mail: <input type="email" name="user_email"/>

<input type="submit" />

</form>该表单标签是电子邮箱输入框   novalidate=true表示不验证该区域,直接提交

 

3 Name: <inputtype="text" name="usr_name" required="required" /> 该标签required 属性适用于以下类型的 <input> 标签:text, search, url, telephone, email, password, date pickers, number,checkbox, radio 以及 file。这些东西都必须在提交之前完成而且不能为空

4 User name: <input type="text"name="user_name"  autofocus="autofocus" /> 该标签的属性值设定在进入页面时 这个标签内容自动成为焦点

5 Country code: <input type="text" name="country_code"

pattern="[A-z]{3}" title="Three letter country code" />例子显示了一个只能A-Z里面选择三个字母的文本域(不含数字及特殊字符):

6 cursor定义和用法

cursor 属性规定要显示的光标的类型(形状): 
span.crosshair {cursor:crosshair;}

span.help {cursor:help;}

span.wait {cursor:wait;}

7伪元素:

:first-letter  :将特殊的样式添加到文本的首字母p:first-letter {color: #FF0000; font-size: 24pt;}

 

     first-line:将特殊的样式添加到文本的首行

:before:在某元素之前插入某些内容

After:在元素之后插入某些内容

8.first –child  定义第一排的元素为某样式

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<style type="text/css">

p:first-child {font-weight: bold;}

li:first-child {text-transform:uppercase;}

</style>

</head>

 

<body>

<div>

<p>These are the necessary steps:</p>

<ul>

<li>Intert Key</li>

<li>Turn key <strong>clockwise</strong></li>

<li>Push accelerator</li>

</ul>

<p>Do <em>not</em> push the brake at the same timeas the accelerator.</p>

</div>

 

<p><b>注释:</b>必须声明 DOCTYPE,这样 :first-child 才能在 IE 中生效。</p>

</body>

 

</html>

9.CSS 属性capitalize  文本中的每个单词以大写字母开头。

Uppercase 定义仅第一个字母大写

 

 

 

 

 

0 0
原创粉丝点击