我凌乱的样式表只是没有风格.... [英] My messy stylesheets just ain't got no style....

查看:73
本文介绍了我凌乱的样式表只是没有风格....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仍然是风格的新手,所以我希望我的方式能够得到认真改善,即。我只是

没有明显的关于编码的层叠性质的明显信息,我认为这与属性与一个人的关系有关。 >
另一个''嵌套''...


我想我可以通过这个例子说明野兽的本质,

使用只有两种文字样式:

p {font-family:" arial"," verdana"," helvetica",sans-serif; font-size:

80%;颜色=#FF0000; font-weight:normal; text-align:justify;

margin-left:2px; margin-right:2px;}


..subHead {font-family:" arial"," verdana"," helvetica",sans-serif;

字体大小:80%;颜色=#0000FF; font-weight:bold; text-align:left;

margin-left:2px; margin-right:2px;}

显然,只需使用< p> Text<< p> Text<>就可以非常方便地指定

等等。 / p>和子标题< p

class =" subHead"> Heading< / p> ;.


我发现事情变得尴尬如果我偶尔想要的话:

#1文本仅在< br>之后跟随子标题。换行(即< p>< / p>中的
),

class =" subHead"> include< / span>


然后,当然,subHead文本将继承< p>< / p为H.段落's $

属性:即它会更小,并且在

换行符的情况下,将进一步插入,因为边距将是

增量,如果它符合分配区域的右边缘

(比如表格单元格)也是合理的。

唯一的方法我可以看到其中一些是:

#1有两个指定的''相对'和''绝对'版本

样式,

#2或使用更多内联< span style ="大量样式规格" ;;>< / span>

指定。


当然,这两种方法都会极大地增加编码量b / b $ b。首先需要创建许多替代

''相对''样式来匹配

文档中找到的每个组合,第二种方法会否定任何优势

由css over html授予,html'需要完全指定每个'

每次出现''非标准''文本。


对不起,这是啰嗦,如果不是很清楚!我花了很多时间来确定我在这方面的无能为力。


感谢您阅读这篇文章。评论欢迎......

I''m still relativey new to stylesheets, so I''m hoping that the way I''m
going about things can be seriously improved upon, i.e . I just
haven''t undersood something obvious about the ''cascading'' nature of
the coding, which I believe concerns the way attributes relate to one
another when ''nested''...

I think I can illustrate the nature of the beast with this example,
using just two text styles:
p {font-family: "arial", "verdana","helvetica", sans-serif; font-size:
80%; color=#ff0000; font-weight: normal; text-align: justify;
margin-left: 2px; margin-right: 2px;}

..subHead {font-family: "arial", "verdana","helvetica", sans-serif;
font-size: 80%; color=#0000ff; font-weight: bold; text-align: left;
margin-left: 2px; margin-right: 2px;}
Obviously it''s very convenient to be able to specify such a lot over
and over just by using <p>Text</p>, and subheadings with <p
class="subHead">Heading</p>.

Where I find things get awkward is if I occasionally want to have:
#1 the text follow the subheading after only a <br> line-break (i.e.
within the <p></p>),
#2 or the subHead style used within the text paragraph using <span
class="subHead">include</span>

Then, of course, the subHead text will inherit the <p></p> paragraph''s
attributes: i.e. it will be smaller and, in the case of the
line-break, will be further inset because the margin will be
incremental, and if it meets the right-hand edge of the allocated area
(say a table cell) will also be justified.
The only ways I can see to get round some of this are:
#1 to have ''relative'' and ''absolute'' versions of the two specified
styles,
#2 or to use more inline <span style="lots of style specs";></span>
specifying.

Of course, both methods would increase the amount of coding
tremendously. The first would require creating many alternative
''relative'' styles to match every combination found within the
documents, and the second approach would negate any advantage
conferred by css over html, with html''s need to specify fully each and
every occurrence of ''non-standard'' text.

Sorry this is long-winded, and if it''s not very clear! It''s taken me
quite a while just to identify where my inability lies in this regard.

Thanks for reading this far. Comments welcome...

推荐答案

Herbert写道:
Herbert wrote:
我仍然是风格的新手


我建议你读一下这个小组。你的一些问题会在其他主题中回答,你会学会避免某些事情



p { font-family:" arial"," verdana",


不要指定verdana。

font-size:80%;
I''m still relativey new to stylesheets
I suggest you read this group for a while. Some of your questions will
be answered in other threads, and you''ll learn to avoid certain things
along the way.
p {font-family: "arial", "verdana",
Don''t specify verdana.
font-size: 80%;




不要为段落文本指定80%的字体大小。让用户决定

哪个font-size适合他们。请参考这些问题的

主题分数(使用Google搜索它们)。


-

Brian

按照我的地址中的说明给我发电子邮件



Don''t specify a font-size of 80% for paragraph text. Let users decide
which font-size is right for them. Please refer to the scores of
threads on these matters (use Google to search for them).

--
Brian
follow the directions in my address to email me


好吧Brian,它确实发生在我身上添加请不要对于是否指定80%或任何特定字体是一个好主意,

等等,请不要评论

。但是,我希望后续工作可能来自那些知道这些都是例子的人,可能会继续实际提供一些有用的信息,但我猜它很难抗拒,呃?


除非我指出了100%的偏差,否则就没有

相对大小 - 差异来描述,现在,会不会?


仅供参考我一直在阅读这个NG,并研究了大量的CSS指南,现在已经有一段时间了。而且我很清楚给出了关于

的建议,允许''用户决定''(根据我的经验,这几乎是

)总是由那些无法提供的人提供如果他们尝试的话,不构建一个有吸引力的
网站)。我知道只有一个人故意

改变了他们浏览器的字体大小设置。 100%任何东西的网站

往往看起来像婴儿的教科书。大多数真正的人(由编码极客传来的传说中的人群中的b $ b $)不会给它一个

的想法,只要它在一个 - 相当宽的范围内 - 易读性范围。


我知道你有能力提供有用的指导。但接下来,

这个后续行动是90%的跛脚。我知道这被表示为''不'

帮助'',但它同样可以掩盖''不能帮助''。


我对verdana verboten感到悲观。


现在谁想成为第一个说''不要发帖'的人?但请记住

,因为布莱恩剪断了我原来发布的相关内容,

那里不容错过......

星期六,2003年10月4日03:53:31 GMT,Brian

< us ***** @ mangymutt.com.invalid-remove-this-part>写道:
Well Brian, it did occur to me to add "please don''t bother commenting
on whether specifying 80% or any particular font is a good idea,
etc.". However, I''d hoped follow-ups might be from people who
realised these were examples and might go on to actually provide some
useful information, but I guess it''s just too difficult to resist, eh?

Unless I''d specified some deviation from 100%, there''d have been no
relative size-difference to describe, now, would there?

FYI I have been reading this NG, and studying numerous CSS guides, for
some time now. And I am well aware of the kind of advice given as to
allowing the ''user decide'' (which in my experience is almost
invariably provided by people who couldn''t construct an engaging
website if they tried). I know just one person who intentionally
changes their browser''s font-size setting. Sites with 100% anything
tend to look like infant''s text books. Most real people (as distinct
from the fabled crowd conjured by coding-geeks) don''t give it a
thought provided it''s within a - fairly wide - legibility range.

I know you are capable of providing helpful guidance. But come on,
this follow-up was 90% lame. I know this is presented as ''won''t
help'', but it could equally well be masking ''can''t help''.

I am pessimistically curious as to the verdana verboten.

Now who wants to be first to say ''don''t top post''? But bear in mind
that since Brian snipped the relevant bits of my original posting,
there ain''t much to be missed down there...
On Sat, 04 Oct 2003 03:53:31 GMT, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
赫伯特写道:
我还是风格的新手



我建议你读一下这群人有一段时间了。你的一些问题将在其他主题中得到解答,你将学习如何避免某些事情。



I suggest you read this group for a while. Some of your questions will
be answered in other threads, and you''ll learn to avoid certain things
along the way.

p {font-family :arial,verdana,
p {font-family: "arial", "verdana",



不要指定verdana。



Don''t specify verdana.

font-size:80%;
font-size: 80%;



不要为段落文本指定80%的字体大小。让用户决定哪种字体大小适合他们。关于这些问题,请参考
主题的分数(使用Google搜索它们)。



Don''t specify a font-size of 80% for paragraph text. Let users decide
which font-size is right for them. Please refer to the scores of
threads on these matters (use Google to search for them).






Herbert< do ******@email.me.ok>写道:
Herbert <do******@email.me.ok> wrote:
现在谁想成为第一个说''不要顶尖''?
Now who wants to be first to say ''don''t top post''?




没有人, 希望。请继续毫无保留地发帖,直到你有一些有用或有趣的话来说。请继续使用伪造的

电子邮件地址,直到您有线索为止。 HTH。手。


-

Yucca, http://www.cs.tut.fi/~jkorpela/


这篇关于我凌乱的样式表只是没有风格....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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