一、H5新元素(結構語義化)
標籤 語義
<nav> 等同於《div class=”nav”>》 導航
<header> 頁眉
<footer> 頁腳
<section> 區塊
<article> 文章
<aside> 側邊欄
<progress> 進度條
<details> 文檔細節
<summary> 標題
<mark> 標記文本
<time> 日期,時間《》
<dialog> 對話框
二、表單新類型
類型 使用示例 含義
email <input type="email"> 輸入郵箱格式
tel <input type="tel"> 輸入手機號碼格式
Url <input type="url"> 輸入url格式
number <input type="number"> 輸入數字格式
search <input type="search"> 搜索框(體現語義化)
range <input type="range"> 自由拖動滑塊
color <input type="color"> 拾色器
time <input type="time">
date <input type="date"> 日期(這個支持的瀏覽器多)
datetime<input type="datetime"> 支持的瀏覽器少
month <input type="month">
week <input type="week">
file <input type=”file”>
表單元素
<datalist> 數據列表
<keygen> 生成加密字符串
<output> 輸出結果(語義化)
<meter> 度量器
表單屬性
placeholder <input type="text" placeholder="透明"> 佔位符
autofocus <input type="text" autofocus> 自動獲得焦點
multiple <input type="file" multiple> 多文件上傳
required <input type="text" required> 必填項
三、彈幕標籤(marquee)
可作爲容器(沒有測試太多,可能會有些標籤不能裝在裏面)
marquee常用到的兩個事件:
onMouseOut="this.start()" 當鼠標移出該區域時
onMouseOver="this.stop()" 當鼠標移入該區域時
<marquee behavior="alternate">來回滾動。 </marquee>
<marquee behavior="scroll">重複滾動。</marquee>
<marquee behavior="slide">不重複滾動。</marquee>
<marquee direction="down">設定活動字幕的滾動方向向下</marquee>
<marquee direction="left">設定活動字幕的滾動方向向左</marquee>
<marquee direction="right">設定活動字幕的滾動方向向右</marquee>
<marquee direction="up">設定活動字幕的滾動方向向上</marquee>
height 設定活動字幕的高度
width 設定活動字幕的寬度
bgcolor 設定活動字幕的背景顏色。
loop 設定滾動的次數,當loop=-1表示一直滾動下去,默認爲-1
scrollamount 設定活動字幕的滾動速度,單位pixels
scrolldelay 設定活動字幕滾動兩次之間的延遲時間,單位millisecond(毫秒)