增强的页面元素
2016-07-26 23:15
453 查看
figure和figcaption元素
details和summary 元素
mark 元素
progress元素
meter元素
ol元素
dl元素
cite元素
small元素
details和summary 元素
mark 元素
progress元素
meter元素
ol元素
dl元素
cite元素
small元素
figure和figcaption元素
<!--figure元素和figcaption元素--> <!--figcaption是figure的标题,一个figure只有一个figcaption--> <figure> <img src="img/1.jpeg" width="200" height="200"> <img src="img/2.jpg" width="200" height="200"> <img src="img/3.jpg" width="200" height="200"> <figcaption>秦时明月</figcaption> </figure>
details和summary 元素
<!--details元素与summary元素--> <!--summary是details默认显示的标题 没有summary标题将显示详细信息--> <details id="detail" onclick="click(this)"> <summary>速度与激情7</summary> <p id="text">激情四射的速度与激情7</p> </details> <script> function click(detail) { var text = document.getElementById('text'); if (detail.open) { text.style.visibility = "hidden"; } else { text.style.visibility = "visible"; } } </script>
mark 元素
<!--mark元素 高亮部分--> <p>asd <mark>sadasd</mark> asdasd </p>
progress元素
<section> <h2>progress元素的使用</h2> <p>完成的百分比: <progress id="pro" style="background-color: aqua" max="100"></progress> <span id="span">0</span>% </p> <input type="button" onclick="btn()" value="点击"> </section> <script> function btn() { var i = 0; function thread_one() { if (i <= 100) { updateProgress(i++); } } setInterval(thread_one, 100);//指定多长时间执行一次 } function updateProgress(newValue) { var progress = document.getElementById('pro'); progress.value = newValue; document.getElementById('span').textContent = newValue; } </script>
meter元素
<!--meter元素 下线low 上线high 最佳值optimum--> <meter value="40" min="0" max="100" low="10" high="90" optimum="80"></meter>
ol元素
<!--ol元素 start从5开始排序 reversed倒序--> <ol start="5" reversed> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ol>
dl元素
<dl> <dt>hello</dt> <dd>你好,hello</dd> <dt>博客</dt> <dd>我的博客</dd> </dl>
cite元素
<!--cite元素--> <h3>cite元素</h3> <p>我最喜欢的动漫<cite>秦时明月</cite></p>
small元素
<!--small元素 额外信息,内嵌在页面中,css样式需要自己定义--> <small>额外信息,内嵌在页面中</small>
相关文章推荐
- HTML5中在客户端验证文件上传的大小
- html5 web数据存储
- 页面元素查找之Selectors API
- 使用ajax实现用户登录验证(升级版)
- Canvas 在高清屏下绘制图片变模糊的解决方法
- 关于前端的思考与感悟
- 新时代编辑神器:Atom
- rem : web app适配的秘密武器
- jquery高级应用之Deferred对象
- 又被事件冒泡坑了一把,这次要彻底弄懂浏览器的事件流
- 移动端点击事件全攻略,这里的坑你知多少?
- $q 实例分析 Angular 中的 Promise
- 浏览器中唤起native app || 跳转到应用商城下载
- Angular directive 实例详解
- 关于浮动与清除浮动,你应该知道的
- 数组reduce方法的高级技巧
- 原生js结合html5制作小飞龙的简易跳球
- HTML5游戏引擎LTweenLite实现的超帅动画效果(附demo源码下载)