网络科技

    今日:1518| 主题:245636
收藏本版
互联网、科技极客的综合动态。

[其他] What’s New in HTML 5.1

[复制链接]
枕梦 发表于 6 天前
21 5

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

What’s New in HTML 5.1-1 (impressive,features,released,standard,because)

  A glimpse of HTML 5.1

  The release of the HTML5 standard about two years ago was a big deal in the web development community. Not only because it came packing an impressive list of new features, but also because it was the first major update to HTML since HTML 4.01 was released in 1999. You can still see some websites bragging about the use of the “modern” HTML5 standard today.
   Fortunately, we didn’t have to wait quite that long for the next iteration of HTML. In October 2015, the W3C started working on the draft of HTML 5.1 with the goal of fixing some of the issues that were left open in HTML5. After many iterations, it reached the state of “Candidate Recommendation” in June 2016, “Proposed Recommendation” in September 2016 and finally a W3C Recommendation in November 2016. Those who followed this development probably noticed that it was a bumpy ride. A lot of initial HTML 5.1 features were dropped due to poor design or a lack of browser vendor support.
   While HTML 5.1 was still in development, the W3C has already started working on a draft of HTML 5.2 which is expected to be released in late 2017. In the meantime, here’s an overview of some of the interesting new features and improvements introduced in 5.1. Browser support is still lacking for these features but we’ll refer you to at least some browsers which can be used to test each example.
   Context Menus Using the menu and menuitems Elements

   The draft version of 5.1 introduced two different kinds of menu elements: context and toolbar . The former is used to extend the native context menus, usually displayed by right-clicking on the page, and the latter was intended to define plain menu components. In the process of development, toolbar was dropped, but the context menu still remains.
   You can use the    tag to define a menu consisting of one or several    elements and then bind it to any element using the  contextmenu  attribute.
   Each can have one of the three types:
  
       
  • checkbox – allows you to select or deselect an option;   
  • command – allows you to execute an action on click;   
  • radio – allows you to select one option from a group.  
  Here’s a basic usage example which works in Firefox 49, but doesn’t seem to work in Chrome 54.
   See the Pen HTML 5.1 menu example by SitePoint ( @SitePoint ) on CodePen .
  In a supported browser, that context menu should look like so:

What’s New in HTML 5.1-2 (impressive,features,released,standard,because)
   Context menu with custom items
    Details and Summary Elements

   The new  
  and    elements implement the ability to show and hide a block of additional information by clicking on an element. This is something that’s often done using JavaScript which can now be done using the
element with a element inside it. Clicking on the summary toggles the visibility of the rest of the content from the
element.
  The following example has been tested in Firefox and Chrome.
   See the Pen HTML 5.1 details and summary demo by SitePoint ( @SitePoint ) on CodePen .
  That demo in a supported browser should look like so:
123下一页
友荐云推荐




上一篇:京东大数据看农村电商消费:年轻、重促销、爱大牌、潜力巨大 ...
下一篇:2016 只剩最后一个月!!你的“技术债务”还清了吗?
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

rainy823 发表于 6 天前
前排支持下!
回复 支持 反对

使用道具 举报

陈春 发表于 6 天前
幸福毕竟不是曹操,怎能说到就到。
回复 支持 反对

使用道具 举报

uc1026 发表于 6 天前
不回帖的话就太任性了
回复 支持 反对

使用道具 举报

angelayang 发表于 前天 01:17
边撸边过
回复 支持 反对

使用道具 举报

那傷丶壹直繞 发表于 昨天 14:07
牛人 佩服!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表