I'm getting this error when I validate through w3c validator:
Attribute duration not allowed on element li at this point.
<li data-text-id="#bannerscollection_kenburns_photoText3" data-horizontalPosition="center" data-verticalPosition="center" data-initialZoom="1" data-finalZoom="1" duration="5" >
Somebody please help me. Thanks in advance
试试这个代码:
<li data-text-id="#bannerscollection_kenburns_photoText3" data-horizontalPosition="center" data-verticalPosition="center" data-initialZoom="1" data-finalZoom="1" data-duration="5" >
As the message says, the attribute duration
is not allowed for the element li
, as you can easily check in the specification :
Content attributes:
- Global attributes
- If the element is a child of an
ol
element:value
duration
is not a global attribute .
You could prefix it with data-
, as you do it with all the other attributes, too. But then, if you use a third-party tool that needs a duration
attribute, it would not work anymore. (You didn't say anything about a tool in your question, though.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.