“property=”“”是什么意思?做?
我正在开发 Drupal 网站/主题。 CSS 和 PHP 的修改相当容易;他们只需要花一点时间来学习并按照我想要的方式工作。
但是,由于我认为是属性函数,因此我在将 CSS 样式应用于某些元素时遇到问题。
代码类似于
。
什么是属性函数?它在页面中起什么作用或控制什么?另外我该如何修改或删除它?
I'm working on a Drupal site/theme. The CSS and PHP modifications are fairly easy; they just take a little time to learn and get working exactly how I want.
However, I'm having issues applying CSS styles to some elements because of what I think is a property function.
The code looks like <h2 property="dc:title" datatype="" class="node-title">
.
What is a property function and what does it do or control within the page? Also how can I modify or remove it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它不是一个属性函数;它是从 RDFa 使用的属性,并且是从 RDF 模块添加的。
删除这些属性的更简单方法是禁用该模块,但我不建议这样做,因为该模块的目的是使用元数据丰富您的内容,以便其他应用程序更好地理解其关系和属性。
或者,如果问题仅在于用于节点的该属性,那么您可以实现类似于以下代码的代码:
该模块应该在 RDF 模块之后执行,以允许其钩子在由 RDF 模块实现的钩子之后执行RDF 模块。
我没有发现 RDF 模块添加的属性与 Drupal 核心或第三方模块执行的 JavaScript 代码之间存在任何兼容性问题。可能需要调查添加这些 HTML 属性后 JavaScript 代码出现问题的原因。
It's not a property function; it's an attribute that is used from RDFa, and that is added from the RDF module.
The easier way to remove those attributes is to disable the module, but I would not suggest doing it, as the purpose of that module is to enrich your content with metadata to let other applications better understand its relationships and attributes.
Alternatively, if the problem is just with that property, used for the nodes, then you can implement code similar to the following one:
The module should be executed after the RDF module, to allow its hook to be executed after the one implemented by the RDF module.
I have not seen any compatibility problem between the attributes added by the RDF module and the JavaScript code executed by Drupal core or third-party modules. It would probably be the case to investigate why you are having problems with the JavaScript code when those HTML attributes are added.
在你的CSS文件中,输入:
或者如果它是一个链接,你可能需要:
in your css file, put:
or if it is a link, you may need:
从维基百科,查看 RDFa
它基本上是一种向 XHTML 文档添加更多元数据以获得更好语义的方法。
From wikipedia, check out RDFa
It is basically a way to add more metadata to XHTML docs for better semantics.