HTML - CSS变量名称对应。 [英] HTML - CSS variable names correspondence.

查看:72
本文介绍了HTML - CSS变量名称对应。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我很奇怪,html和css使用不同的名称来定义相同属性的变量

。例如,如果我想从html文档定义文本

颜色,我写道:


< body text =" #dddddd">


要从css文件中定义文本颜色,我需要写一下:


body {color:" #dddddd" ;;}


在第一个例子中,需要使用text。在第二个例子中

" color"。你知道在哪里可以找到一个html-css词典在

Internet?或者至少,在哪里我可以找到css变量的完整列表

名字?例如,我有< body> tag bottomMargin =" 0"我想

喜欢从css文件中设置这个参数的值,我不确定

在css文件中我可以写一下:


body {bottomMargin:" 0"}

Hello,

It is strange to me that html and css use different names for variables
which define the same properties. For example if I whant to define text
color from html document I write:

<body text="#dddddd">

And to define text color from css file I need to write:

body {color: "#dddddd";}

In the first example one need to use "text" in the second example
"color". Do you know where I can find an html-css dictionary in
Internet? Or at least, where I can find full list of css variable
names? For example I have in <body> tag bottomMargin="0" and I would
like to set value of this parameter from css file and I am not sure
that in css file I can just write:

body {bottomMargin: "0"}

推荐答案

在comp.infosystems中。 www.authoring.html op ********* @ yahoo.com 写道:
in comp.infosystems.www.authoring.html, op*********@yahoo.com wrote:
你好,

我很奇怪html和css对变量使用不同的名称来定义相同的属性。


不,不是。 CSS有很多属性,而且它们通常适用于许多元素,而不是一个。


变量是非常错误的术语...

例如,如果我想从html文档定义文本颜色,我写道:

< body text =" #dddddd">

body {color:" #dddddd" ;;}


这是因为CSS,你可以设置边框到body {border-style:solid}

,然后继承颜色。所以它并不仅仅意味着文字颜色。

你知道我在哪里可以找到互联网上的html-css字典吗?


没有这样的东西,它就像是C ++和英语的字典,让

没那么多......(但可能很有趣)

或者至少,在哪里可以找到css变量名称的完整列表?

http:// www。 w3.org/TR/REC-CSS2/propidx.html

例如我有< body> tag bottomMargin =" 0"
Hello,

It is strange to me that html and css use different names for variables
which define the same properties.
No, it is not. CSS has lots more properties, andthey are usually
applicable to many elements, instead of one.

And variable is very wrong term...
For example if I whant to define text
color from html document I write:

<body text="#dddddd">

And to define text color from css file I need to write:

body {color: "#dddddd";}
That is because with CSS, you can set border to body {border-style:solid}
and then the color is inherited. So it doesn''t mean just text color.
Do you know where I can find an html-css dictionary in Internet?
There is no such thing, it''s like dictionary of C++ and English, makes
not much sence... (but might be fun)
Or at least, where I can find full list of css variable
names?
http://www.w3.org/TR/REC-CSS2/propidx.html
For example I have in <body> tag bottomMargin="0"




请注意,bottomMargin不是html ...

margin-bottom:0;


-

Lauri Raittila< http://www.iki.fi/lr> < http://www.iki.fi/zwak/fonts>

乌得勒支,NL。



Notice that bottomMargin is not html...
margin-bottom:0;

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.


op ********* @ yahoo.com 写道:
op*********@yahoo.com wrote:
它是我很奇怪,html和css使用不同的名称来定义相同属性的变量
。例如
< body text =" #dddddd">
body {color:" #dddddd" ;;}


或:


< font color =" #dddddd">

font {color:#dddddd; }


(CSS中的颜色没有引号)


总的来说,CSS更加一致。

或者至少,在哪里可以找到css变量名称的完整列表?
It is strange to me that html and css use different names for variables
which define the same properties. For example <body text="#dddddd">
body {color: "#dddddd";}
Or:

<font color="#dddddd">
font { color: #dddddd; }

(There are no quotes around colours in CSS)

Overall, CSS is more consistant.
Or at least, where I can find full list of css variable
names?



http://www.w3.org/TR/CSS21/propidx.html


-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方



http://www.w3.org/TR/CSS21/propidx.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


On 28/03 / 2005 17:14, op*********@yahoo.com 写道:
On 28/03/2005 17:14, op*********@yahoo.com wrote:
我很奇怪html和css使用不同的名称来定义相同属性的变量



为什么? CSS不仅适用于HTML。它可以被任何

结构化文档使用。顺便说一句,HTML有属性,CSS有

属性。两者都没有变数。 :)

例如,如果我想从html文档定义文本颜色,我写道:

< body text =" #dddddd">
<为了定义css文件中的文本颜色,我需要写一下:

body {color:" #dddddd" ;;}


没有引号在CSS示例中。

在第一个示例中,需要使用text。在第二个例子中,颜色。


是的,但是颜色属性不仅仅会影响文档中的文本

。其他功能,如边框,也可以使用这个

值,如果他们没有自己明确设置。

你知道我在哪里可以找到一个html-互联网上的CSS字典?


HTML规范[1]本身通常为

弃用的表示元素和属性提供CSS示例。

或者至少,在哪里可以找到css变量名的完整列表?


CSS规范[2]有一个属性索引[3],就像HTML

规范有一个属性和元素索引一样。


[snip]

body {bottomMargin:" 0"}
It is strange to me that html and css use different names for variables
which define the same properties.
Why? CSS isn''t only for use with HTML. It can be used by any
structured document. By the way, HTML has attributes, and CSS has
properties. Neither have variables. :)
For example if I whant to define text color from html document I write:

<body text="#dddddd">

And to define text color from css file I need to write:

body {color: "#dddddd";}
Without the quotes in the CSS example.
In the first example one need to use "text" in the second example
"color".
Yes, however the color property can affect more than just the text
within a document. Other features, such as borders, may also use this
value if they don''t have their own explicitly set.
Do you know where I can find an html-css dictionary in Internet?
The HTML specification[1] itself usually provides CSS examples for
deprecated presentational elements and attributes.
Or at least, where I can find full list of css variable names?
The CSS specification[2] has a property index[3], just like the HTML
specification has an attribute and element index.

[snip]
body {bottomMargin: "0"}




差不多。


身体{

保证金底部:0;

}


你也可以指定全部双方使用速记符号。顺时针方向所有四边都需要

:顶部,右侧,底部和左侧。如果缺少

后一个值,则使用其对方的值。对于

例子,


1)保证金:1ex;


所有方面都有1ex的保证金。


2)保证金:0 3px;


顶部和底部没有边距,而左边和

右边有3px边距。


3)保证金:0 3px 1em;


顶边没有边距,底部有1em保证金,并且

左右有3px保证金。


注意,非零值必须附带一个单位。请参阅

4.3.2 - 长度[4]以获取更多信息。


希望有所帮助,

Mike

[1]< URL:http://www.w3.org/TR/html4/>

[2]< URL:http://www.w3 .org / TR / REC-CSS2 />

[3]< URL:http://www.w3.org/TR/REC-CSS2/propidx.html>

[4]< URL:http://www.w3.org/TR/REC-CSS2/syndata.html#length-units>


-

Michael Winter

替换.invalid与.uk通过电子邮件回复。



Almost.

body {
margin-bottom: 0;
}

You can also specify all sides using the shorthand notation. It takes
all four sides in clockwise order: top, right, bottom, and left. If a
latter value is missing, it uses the value of its opposite side. For
example,

1) margin: 1ex;

All sides have a margin of 1ex.

2) margin: 0 3px;

The top and bottom sides have no margin, whilst the left and
right have a 3px margin.

3) margin: 0 3px 1em;

The top side has no margin, the bottom has a 1em margin, and the
left and right have a 3px margin.

Note that non-zero values must be accompanied by a unit. See section
4.3.2 - Lengths[4] for more information.

Hope that helps,
Mike
[1] <URL:http://www.w3.org/TR/html4/>
[2] <URL:http://www.w3.org/TR/REC-CSS2/>
[3] <URL:http://www.w3.org/TR/REC-CSS2/propidx.html>
[4] <URL:http://www.w3.org/TR/REC-CSS2/syndata.html#length-units>

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


这篇关于HTML - CSS变量名称对应。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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