[HELP] CSS没有在asp.net页面中显示字体 [英] [HELP] CSS is not showing font in asp.net page

查看:92
本文介绍了[HELP] CSS没有在asp.net页面中显示字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#body_left h1{
	font:normal 64px/67px Regular, "Century Gothic" ;
	color:#245E06;
        text-align:left;
	background-color:inherit;
}





我的上述代码有什么问题?我什么时候试图改变它...



What is wrong with my this above code?? When ever i'm trying to change it from..

#body_left h1{
	font:normal 64px/67px Georgia, "Times New Roman", Times, serif;
	color:#245E06;
	background-color:inherit;





它没有在我的asp.net页面中显示h1标签。我正在我的asp.net页面中实现CSS。



it is not showing that h1 tag in my asp.net page. i was implementing CSS in my asp.net page.

推荐答案

Makzrider写道
Makzrider wrote

它没有在我的asp.net页面中显示h1标签

it is not showing that h1 tag in my asp.net page

这个问题与你在问题标题中提到的CSS和字体无关。 标记只有在用HTML 编写时才能显示:

This concern has nothing to do with CSS and fonts you mentioned in your question title. The tag can be shown only if you write it in HTML:

<h1 id="body_left">Some Top-Level Header Text</h1>



此外,这是一个非常糟糕的想法(在大多数情况下),将标题样式与ID绑定在一起。请记住,所有 id 属性的所有值在页面上都应该是唯一的(如果违反此规则,HTML呈现和行为可能是不可预测的)。你真的想要只有一种独特的风格只能应用于一个独特的元素吗?



对于标题,最好不要使用任何选择性样式识别:


Besides, this is a really bad idea (in most cases), to bind the header styles with IDs as you do it. Remember, all values of all id attributes should be unique on the page (and HTML rendering and behavior, if you violate this rule, can be unpredictable). Do you really want to have only one unique style to be applied only to one unique element?

For headers, it's much better to use no selective style identification at all:

h1 {/* ... */}

在最坏的情况下,使用类(通过元素属性 class =...):

In worst case, use classes (via the element attribute class="..."):

h1.Left {/* ... */}
.left {/* ... */}





最后,您应该记住某些字体系列可能与某些系统不兼容。同时,可以在CSS中嵌入完全自定义的字体。请参阅:

http://www.paulirish.com/ 2009 / bulletproof-font-face-implementation-syntax / [ ^ ]。



-SA


这篇关于[HELP] CSS没有在asp.net页面中显示字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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