【发布时间】:2020-03-12 19:52:17
【问题描述】:
我需要一些帮助来更改我的链接颜色。这是目前我的 asp.net 代码。
<div class="tile">
<div class="first">
<b>Links</b>
<div class="links">
<asp:HyperLink ID="hyperlink1" NavigateUrl="#ss" Text="Phone List" CssClass="linkbutton" runat="server" />
<br />
<asp:HyperLink ID="hyperlink2" NavigateUrl="#ff" Text="FAQ" CssClass="linkbutton" runat="server" />
<br />
<asp:HyperLink ID="PMOLink" NavigateUrl="/PMO/PMO.aspx" Text="PMO" CssClass="linkbutton" runat="server" />
<br />
<asp:HyperLink ID="PMLink" NavigateUrl="/PM/PM.aspx" Text="PM" CssClass="linkbutton" runat="server" />
</div>
</div>
<br />
</div>
这是我的 CSS 代码。
.first {
float: left;
height: 100%;
width: 10%;
text-align: left;
}
.links {
display: block;
text-align: left;
height: 109px;
width: 251px;
}
.tile {
border-style: solid;
padding: 14px;
border-width: 3px;
color: black;
display: inline-block;
height: 130px;
list-style-type: none;
margin: 10px 40px 10px 20px;
position: relative;
text-align: left;
width: 270px;
border-radius: 25px;
box-shadow: 10px 10px 5px #888888;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #CCF11B), color-stop(1, #3874FF));
background-image: linear-gradient(-28deg, #CCF11B 0%, #3874FF 100%);
vertical-align: top;
text-align: center;
}
/* Change the Links colors here!*/
linkbutton:link {
text-decoration: none;
color: blue;
}
linkbutton:visited {
text-decoration: none;
color: blue;
}
linkbutton:hover {
text-decoration: underline;
color: blue;
}
linkbutton:active {
text-decoration: underline;
color: blue;
我的结果应该是当我将鼠标悬停在链接上时,转到上述链接,一般来说只是链接,它们应该保持相同的颜色并且永远不会改变。我还被告知它更容易使用 CSS 然后 C#。请问我能得到一些帮助吗!
【问题讨论】: