在h5里,交互元素就是和用户进行互动的元素,这一部分非常的重要,并且和之前的js控制的效果不同,h5相比于html增加了很多的交互元素,比如隐藏显示注脚就是其中的一个交互效果。
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>交互元素<details>的使用</title> <style type="text/css"> body{ font-size: 12px; } span{ font-weight: bold; } details{ overflow: hidden; height: 0; padding-left: 200px; position: relative; display: block; } details[open]{ height: auto; } </style> </head> <body> <span>隐藏脚注</span> <details open="open"> 本页面生成于 2016-010-21 </details> <!--<span>显示注脚</span> 本页面生成于 2016-010-21 <details open="open"> </details> --> </body> </html>
html5里交互元素的使用方法就这么多,相信我们介绍之后你已经了解了不少。更多精彩请关注php中文网其它相关文章!
相关阅读:
立即学习“前端免费学习笔记(深入)”;
以上就是html5里交互元素的使用方法的详细内容,更多请关注php中文网其它相关文章!
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号