如何在aspx页面中使用css? [英] how use css inside a aspx page?

查看:793
本文介绍了如何在aspx页面中使用css?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜。它是一个没有codebehind的aspx文件。在设计方面有css类。

如何将这个页面添加到其他页面的标题?



a此代码的详细信息:

hi. it's a aspx file without codebehind.and in design veiw there is css classes.
how can i add this page to other pages'header?

a detail of this code:

<%@ Page %>

BODY { 
	font-size:8pt; font-family:tahoma;
	scrollbar-face-color:#E5E5E5;
	margin:0px;
	padding:5px;
	background-attachment: fixed;
	background-repeat: no-repeat; 
	background-color:#F8F8F8;
}

TABLE {
	font-size:8pt;
	font-family:tahoma;
}

FORM {
	margin:0px;	
}

TH {
	background-color: #ffffff;
	color:#000000;
}



.containerDiv {
	width:100%;
	height:100%;
	direction:ltr;
}


.errorMessage {
	font-size:8pt;
	font-weight:bold;
	color:firebrick;
}

.ellipsis {
	text-overflow:ellipsis;
	overflow:hidden;
}

.note {
	text-align:middle;
	padding-left:20px;
	padding-right:20px;
	font-weight:600;
	color:firebrick;
}

推荐答案

示例:

Example:
................
<head id="Head1" runat="server">

<style type="text/css">
.containerDiv {
	width:100%;
	height:100%;
	direction:ltr;
}
.errorMessage {
	font-size:8pt;
	font-weight:bold;
	color:firebrick;
} 
.ellipsis {
	text-overflow:ellipsis;
	overflow:hidden;
} 
.note {
	text-align:middle;
	padding-left:20px;
	padding-right:20px;
	font-weight:600;
	color:firebrick;
}
</style>
</head>



问候..:笑:


Regards..:laugh:


如果你想提供这个css的参考然后制作css文件,并给你想要的页面链接。



以这种方式给出链接...... :)



假设你的css文件名是mystyle.css

你的css文件路径是text / css然后链接将是,

if you want to give reference of this css then make css file and give link to pages which are you want.

give link in this way...:)

suppose your css file name is mystyle.css
your css filepath is text/css then link will be,
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>






将类和所有与css相关的内容保存到单独的.css文件中,并将文件引用到所有页面。喜欢:

Hi,

Keep the classes and all the css related things to a separate .css file and refer the file to all the pages. Like:
<linkhref="../CLASSIC/main.css" type="text/css" rel="stylesheet"/>



然后这将对所有文件都可用。



参考:

将CSS添加到aspx页面

如何将CSS代码添加到asp.net网站



谢谢


Then this will be available to all the files.

refer:
Adding the css to the aspx page
how to add css code into asp.net website

Thanks


这篇关于如何在aspx页面中使用css?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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