相关疑难解决方法(0)

@import vs link

首先我知道标题说这是一个重复的问题,在这里,这里这里问.我在这个主题上读到的所有内容都已超过两年了.那个时期有很多变化,所以同样的想法仍然可取吗?

这是一个例子,我在样式表中使用@import来引入我的重置CSS和其他几个样式.我应该改变,从@import<link>?根据这篇文章,我应该使用链接.所以我问其他开发者,到目前为止最真实的方式是什么(2011年8月25日)

css import

58
推荐指数
1
解决办法
3万
查看次数

HTML5中style元素的"scoped"属性的当前状态是什么?

它在这里说http://www.w3.org/TR/html-markup/style.html#style:

允许的父元素

任何可以包含元数据元素,div,noscript,section,article的元素

<style>或多或少让每一个地方(如果<div>是允许的),但是,在另一方面,我发现了一个更详细的信息在这里http://www.w3.org/TR/2012/WD-html5-20121025/the-style -element.html#ATTR式作用域

可以使用此元素的上下文:(注释:样式)

If the scoped attribute is absent: where metadata content is expected.
If the scoped attribute is absent: in a noscript element that is a child of a head element.
If the scoped attribute is present: where flow content is expected, but before any other flow content other than inter-element whitespace, and not as the child of an element whose content model is transparent.
Run Code Online (Sandbox Code Playgroud)

以及本文档的后面部分:

scoped属性是布尔属性.如果存在,则表示样式仅适用于以style元素的父元素为根的子树,而不是整个Document.

如果存在scoped属性且元素具有父元素,则style元素必须是其元素之外的元素的第一个节点,而不是元素间空格,并且父元素的内容模型必须不具有透明组件.

这读起来就像(或将会)"两个不同的 …

html css html5 attributes

25
推荐指数
4
解决办法
1万
查看次数

标签 统计

css ×2

attributes ×1

html ×1

html5 ×1

import ×1