没有span标签的微数据 [英] microdata without span tag

查看:110
本文介绍了没有span标签的微数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,设计师将CSS应用到基础< span>标签使得标签对于微数据标记实际上没用,除非我希望我的所有文本都是蓝色,粗体,比正常大125%。我可以使用替代标签吗?我知道我可以使用< meta>但我实际上希望内容出现,并且必须写两次似乎有点过分。

I have a site where the designer applied CSS to the base <span> tag which makes the tag effectively useless for microdata markup unless I want all my text to be blue, bold, and 125% bigger than normal. Are there alternative tags that I can use? I understand that I can use <meta> but I actually want the content to appear and it seems overkill to have to write it twice.

推荐答案

你可以使用 Microdata的每个 HTML5元素。 请注意某些元素有特殊规则确定值,如果与Microdata一起使用,则某些元素会带来额外的要求。

You can use every HTML5 element for Microdata. But note that some elements have special rules for determining the value, and some elements come with additional requirements if used with Microdata.

如果您的问题是存在另一个没有意义的内联HTML5元素(= span ):不,没有。

If your question is if there is another inline HTML5 element that has no meaning (= span): no, there isn’t.

如果您的问题是如何在没有应用CSS的情况下使用 span :添加到你的 span 元素并用CSS的类选择器覆盖任何应用的CSS:

If your question is how to use span without the applied CSS: add a class to "your" span elements and overwrite any applied CSS with CSS’s class selector:

<span class="never-style-span-directly" itemprop="example">…</span>

CSS:

span {color:blue;}
.never-style-span-directly {color:inherit;}

这篇关于没有span标签的微数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆