css -moz
I'm always on the lookout for interesting vendor-specific features and prefixes. The beauty in them is that they allow developers to enhance where possible; they aren't taken into account as core design, but provide nice little touches. I was poking around Mozilla's MDN and found a great list of proprietary -moz
properties. Here are a few of that I found interesting and useful.
我一直在寻找有趣的特定于供应商的功能和前缀。 它们的优点在于,它们允许开发人员在可能的地方进行增强。 它们没有被视为核心设计,但提供了一些不错的功能。 我在浏览Mozilla的MDN时发现了很多专有的-moz
属性 。 以下是我发现的一些有趣和有用的内容。
::-moz-list-bullet (::-moz-list-bullet)
::-moz-list-bullet
allows developers to style the bullet bullet text in lists; not the content, but the bullet text itself:
::-moz-list-bullet
允许开发人员在列表中设置项目符号文本的样式; 不是内容,而是项目符号文本本身:
ul.customList li::-moz-list-bullet {
color: #999;
font-size: 24px;
text-decoration: underline;
}
Moz力损坏的图像图标 (-moz-force-broken-image-icon)
Firefox presently displays alt
text for every broken image on the page. This may not be helpful for the purposes of debugging because the text may blend into the page. By using -moz-force-broken-image-icon
, you can fore the broken image icon instead of the alt
text:
Firefox当前在页面上为每个损坏的图像显示alt
文本。 这对于调试目的可能没有帮助,因为文本可能会混入页面中。 通过使用-moz-force-broken-image-icon
,可以显示残破的图像图标而不是alt
文本:
img {
-moz-force-broken-image-icon: 1;
}
-moz-margin-start和-moz-margin-end (-moz-margin-start and -moz-margin-end)
Both work very much like margin-left
and margin-right
, but reverse position when in RTL mode. Very useful if you're trying to create a flexible website built for LTR or RTL reading.
两者都非常类似于margin-left
和margin-right
,但是在RTL模式下则反转位置。 如果您要创建一个用于LTR或RTL阅读的灵活网站,则非常有用。
.myBlock {
-moz-margin-start: 10px;
-moz-margin-end: 5px;
}
-东方 (-moz-orient)
The -moz-orient
property currently only applies to progressbar
elements, allowing them to be vertical or horizontal:
-moz-orient
属性当前仅适用于progressbar
元素,允许它们为垂直或水平:
progress.up {
-moz-orient: vertical;
}
-莫兹窗口阴影 (-moz-window-shadow)
-moz-window-shadow
specifies whether a window in OS X will have a shadow.
-moz-window-shadow
指定OS X中的窗口是否具有阴影。
.panel {
-moz-window-shadow: none;
}
There are a few hundred proprietary properties available so take a few moments and let me know if you find any of them interesting, and if you've used any of them for your projects!
有数百种专有属性,因此请花一些时间,让我知道您是否发现其中任何有趣的东西,以及是否已将其中任何一个用于您的项目!
css -moz