现在你说下面的问题我想添加类而不是Id。如何做到这一点 [英] Now U Said For Below Question I Want To Add Class Instead Of Id .How To Do This
本文介绍了现在你说下面的问题我想添加类而不是Id。如何做到这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了一个css编码,我在asp.net中链接标签,但没有work.my编码下面。我在hyper.css中保存了该文件名
实际上我使用的是id =link,但是你告诉我要用类名链接。如何做请请给我打电话
。 link
{ color : red; }
。 link:hover
{ color : 蓝色; }
Asp.net:
< link href = hyper.css rel = stylesheet 样式 = text / css >
< 超链接 id = link > < / hyperlink >
解决方案
请通过此链接
http:// www.w3schools.com/css/ [ ^ ]
<前郎=xml> < html xmlns = http://www.w3.org / 1999 / xhtml >
< head >
< script src = jquery-1.10.2.js 类型 = text / javascript > < / script >
< script type = text / javascript >
< / script >
< style type = text / css >
.link
{
颜色:红色;
}
.link:悬停
{
颜色:蓝色;
}
< / style >
< / head >
< body >
< 表格 id = form1 runat = server >
< asp:HyperLink 文字 = upload ID = HyperLink1 CssClass = link runat = server / >
< / form >
< / body >
< / html >
I done one css coding and i linked in asp.net within tag but not working.my coding below.i saved that file name in hyper.css
Actually i used id="link" but u told i want to use class name "link".how to do please tel me
.link
{color:red;}
.link:hover
{color:blue;}
Asp.net:
<link href="hyper.css" rel="stylesheet" style="text/css">
<hyperlink id="link"></hyperlink>
解决方案
Pls go through this link
http://www.w3schools.com/css/[^]
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="jquery-1.10.2.js" type="text/javascript"></script> <script type="text/javascript"> </script> <style type="text/css"> .link { color: red; } .link:hover { color: blue; } </style> </head> <body> <form id="form1" runat="server"> <asp:HyperLink Text="upload" ID="HyperLink1" CssClass="link" runat="server" /> </form> </body> </html>
这篇关于现在你说下面的问题我想添加类而不是Id。如何做到这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文