关于字体的愚蠢问题。 [英] Stupid question about fonts.

查看:75
本文介绍了关于字体的愚蠢问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最简单的方法(没有设置样式表)为文本区域设置字体

。我需要能够指定确切的字体和字体

大小 - 而不是IE使用的1-7个数字。我希望能够将一些文字设置为

字体= Arial,尺寸= 12pt。


TIA - Jeffrey。

解决方案

Jeffrey,


只需在其周围放一个普通的旧字体标签。


-

此致,


S. Justin Gengo,MCP

网站开发人员/程序员

www.aboutfortunate.com


" Out混乱来了。

Nietzsche

" UJ" < FR ** @ nowhere.com>在消息中写道

新闻:Op ************** @ TK2MSFTNGP14.phx.gbl ...

什么是最简单的方法(无需设置样式表)来设置文本区域的字体。我需要能够指定确切的字体和字体大小 - 而不是IE使用的1-7数字。我希望能够设置一些文字
是Font = Arial,Size = 12pt。

TIA - Jeffrey。



您可以在大多数HTML

元素的样式标记中使用样式表设置。


例如..


< span style =" font:12px arial">此文字为12像素arial!< / span>

< br>

请记住,字体标签正在逐渐被弃用。


使用CSS样式表是可行的方法:


< head>

< link href =" default.css"的rel ="样式表"类型= QUOT;文本/ CSS" />

< / head>


并且,在default.css中:


body

{

字体大小:0.8em;

颜色:#000000;

FONT-FAMILY:Verdana,Arial ,Helvetica,sans-serif;

背景色:#EFEFEF;


}


..txt1 {font-size:1.0em; }

..txt2 {font-size:0.9em; }

..txt3 {font-size:0.8em; }

..txt4 {font-size:0.7em; }

..txt5 {font-size:0.6em; }


..txt1Bold {font-size:1.0em;字体重量:粗体; }

..txt2Bold {font-size:0.9em;字体重量:粗体; }

..txt3Bold {font-size:0.8em;字体重量:粗体; }

..txt4Bold {font-size:0.7em;字体重量:粗体; }

..txt5Bold {font-size:0.6em;字体重量:粗体; }


..txt3red {font-size:0.8em;红色; }


等...


Juan T. Llibre,ASP.NET MVP

ASP.NET常见问题: http://asp.net.do/faq/

Foros de ASP.NET en Espa?ol: http://asp.net .do / foros /

================================= =====

S。 Justin Gengo <贾斯汀@ [no_spam_please] aboutfortunate.com>在消息中写道

news:eT ************* @ tk2msftngp13.phx.gbl ...

Jeffrey,

只需在它周围放一个普通的旧字体标签。

-
真诚的,

S. Justin Gengo,MCP
Web开发人员/程序员

www.aboutfortunate.com

出于混乱而有序。
Nietzsche
UJ < FR ** @ nowhere.com>在留言新闻中写道:Op ************** @ TK2MSFTNGP14.phx.gbl ...

最简单的方法是什么(没有设置风格sheet)设置文本区域的字体。我需要能够指定确切的字体和字体大小 - 而不是IE使用的1-7
数字。我希望能够将一些文本设置为Font = Arial,Size = 12pt。

TIA - Jeffrey。



What''s the easiest way (without setting up a style sheet) to set the font
for an area of text. I need to be able to specify the exact font and font
size - not the 1-7 numbers IE uses. I want to be able to set some text to be
Font=Arial, Size=12pt.

TIA - Jeffrey.

解决方案

Jeffrey,

Just put a regular old font tag around it.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"UJ" <fr**@nowhere.com> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...

What''s the easiest way (without setting up a style sheet) to set the font
for an area of text. I need to be able to specify the exact font and font
size - not the 1-7 numbers IE uses. I want to be able to set some text to
be Font=Arial, Size=12pt.

TIA - Jeffrey.



You can use style sheet like settings in the style tag of most HTML
elements.

For instance..

<span style="font: 12px arial">This text is in 12 pixel arial!</span>


Remember that font tags are on their way to deprecation.

Using a CSS stylesheet is the way to go :

<head>
<link href="default.css" rel="stylesheet" type="text/css" />
</head>

And, in default.css :

body
{
font-size: 0.8em;
COLOR: #000000;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
background-color: #EFEFEF;

}

..txt1 { font-size : 1.0em; }
..txt2 { font-size : 0.9em; }
..txt3 { font-size : 0.8em; }
..txt4 { font-size : 0.7em; }
..txt5 { font-size : 0.6em; }

..txt1Bold { font-size : 1.0em; font-weight:bold; }
..txt2Bold { font-size : 0.9em; font-weight:bold; }
..txt3Bold { font-size : 0.8em; font-weight:bold; }
..txt4Bold { font-size : 0.7em; font-weight:bold; }
..txt5Bold { font-size : 0.6em; font-weight:bold; }

..txt3red { font-size : 0.8em; color: Red; }

etc...

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in message
news:eT*************@tk2msftngp13.phx.gbl...

Jeffrey,

Just put a regular old font tag around it.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"UJ" <fr**@nowhere.com> wrote in message news:Op**************@TK2MSFTNGP14.phx.gbl...

What''s the easiest way (without setting up a style sheet) to set the font for an area
of text. I need to be able to specify the exact font and font size - not the 1-7
numbers IE uses. I want to be able to set some text to be Font=Arial, Size=12pt.

TIA - Jeffrey.




这篇关于关于字体的愚蠢问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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