Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NET + CSSʵÏÖ¶¯Ì¬²Ëµ¥Í»³öÏÔʾµ±Ç°Ò³Ãæ

ÍøÉϹØÓÚÍ»³öÏÔʾµ±Ç°Ò³ÃæµÄÎÄÕÂÓв»ÉÙ£¬µ«ÊÇ»ù±¾¶¼ÊǹØÓÚʵÏÖ¾²Ì¬²Ëµ¥µÄ¸ßÁÁ£¬½²µ½¶¯Ì¬Éú³É²Ëµ¥¸ßÁÁµÄÎÄÕÂÖÁÉÙÎÒûÓÐÕÒµ½£¬ÔÚcsdnÉÏÎÊÁËÁ½Ì춼ûÓд𰸣¬×îºóÔÚһλÅóÓѵĻشðÖÐÕÒµ½Ë¼Â·£¬ÏÈÀûÓÃÒ»¸öº¯ÊýÅжϲ˵¥ÊÇ·ñÊÇÕýÔÚä¯ÀÀµÄµ±Ç°Ò³£¬È»ºó¸¶¸øliÒ»¸öid£¬ÀûÓÃcss²ãµþid´óÓÚclassµÄ¹Øϵ£¬°ÑÕâ¸öid¶¨Òå³É¸ßÁÁÑùʽ¡£
aspxÎļþ´úÂ룺
ÒýÓÃÄÚÈÝ
<div class="navigation">
<ul>
<asp:Repeater ID="Menu" runat="server">
<ItemTemplate >
<li <%#getCss(DataBinder.Eval(Container,"DataItem.Url"))%>><a href ='<%#DataBinder.Eval(Container,"DataItem.Url")%>'> <%#DataBinder.Eval(Container,"DataItem.ClassName")%></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
ºǫ́´úÂ룺vb°æ±¾
ÒýÓÃÄÚÈÝ
Public Function getCss(ByVal Url As Object) As String
Dim curPageName As String = HttpContext.Current.Request.Url.Segments(HttpContext.Current.Request.Url.Segments.Length - 1)
If Url.ToString.ToLower = curPageName.ToLower Then
Return "id='activer'"
Else
Return Nothing
End If
End Function
C#°æ±¾£º
ÒýÓÃÄÚÈÝ
public string getCss(object Url)
{
string curPageName = HttpContext.Current.Request.Url.Segments(HttpContext.Current.Request.Url.Segments.Length - 1);
if (Url.ToString.ToLower == curPageName.ToLower) {
return "id='activer'";
} else {
return null;
}
}
CSSÑùʽ£º
ÒýÓÃÄÚÈÝ
.navigation {
background: url(../images/navigation-bg.png);
height: 38px;
width :1003px;
overflow: hidden;
line-height: 2em;
}
.navigation ul {
list-style: none;
margin: 0 auto;
padding: 0;
text-align: left;
width: 970px;
}
.navigation ul li {
background: none;
display: inline;
float: left;
list-style-type: none;
padding: 0;
}
.navigation ul li a {
color: #666;
display: block;
height: 25px;
overflow: hidden;
padding: 5px 15px 0 15px;
text-decoration: none !important;
}
.navigation ul li a:hover {
color: #fff !important;
}
#activer a{ 'Õâ¸ö¾ÍÊǸßÁÁ²Ëµ¥µÄÑùʽ£¬ÕâÀïÎÒÓÃÁ˱³¾°Í¼Æ¬
background: ur


Ïà¹ØÎĵµ£º

·ÖÏíÎÒµÄһЩASP.NET SEO¾­Ñé

[url=http://www.bvbuy.cn/]·çÓïÍø[/url]
1.ǰ̨ҳÃæÒ»°ã²»ÓÃgridview datalist treeview updatepanel µÈ¿Ø¼þ£¬ÒòΪËûÃÇ»áÉú³ÉºÜ¶àÎÒ²»ÏëÒªµÄ´úÂë¡£¶øÇÒǶÌ×Ò»´ó¶Ñtable
2.ÓÃrepeater+div+css+ul liÒѾ­×ã¹»ÎÒ×öºÜ¶à¶«Î÷ÁË¡£
3.·¢²¼ºóµÄÒ³Ã棬¿ÉÒÔ°ÑһЩ¿ÕÐкͻ»ÐÐ ºÍһЩ²»±ØÒªµÄ¿Õ¸ñÈ¥µô£¬¾¡Á¿¼õÉÙaspxÒ³ÃæµÄÈÝÁ¿¡£ÌḠ......

Asp.netÊý¾Ý°ó¶¨

Êý¾Ý°ó¶¨ÒÔ¼°Container.DataItemµÄ¾ßÌå·ÖÎö
Áé»îµÄÔËÓÃÊý¾Ý°ó¶¨²Ù×÷
°ó¶¨µ½¼òµ¥ÊôÐÔ:<%#UserName%>
°ó¶¨µ½¼¯ºÏ:<asp:ListBox id="ListBox1" datasource='<%# myArray%>' runat="server">
°ó¶¨µ½±í´ïʽ:<%#(class1.property1.ToString() + "," + class1.property2.ToString())%>
°ó¶¨µ½·½·¨·µ» ......

CSSä¯ÀÀÆ÷¼æÈÝÐÔ

 /*²»¹ÜÊÇʲô·½·¨£¬ÊéдµÄ˳Ðò¶¼ÊÇfirefoxµÄдÔÚÇ°Ã棬IE7µÄдÔÚÖм䣬IE6µÄдÔÚºóÃæ¡£*/
.JS_CenterAD_marquee_Right
 {
    
      margin-left:17px !important;  /firefox*/
      *margin-left:17px !important;  / ......

CSS_±í¸ñÔÚIEÓëFFÖеÄdisplay

     ½ñÌì×öÒ»¸ö¹¦ÄÜ£¬¸ù¾ÝselectÔªËØÑ¡ÔñµÄ²»Í¬selectedIndexÏÏÔʾһ¸ö±í¸ñÀïÖ¸¶¨µÄtrÏî¡£
     Ê×ÏÈ£º$("#table tr:gt(0)").css("display","none"); Õâ¸öûÎÊÌ⣬µ±ÒªÏÔʾµÄʱºò.css("display","block"),ÔÚFFÖв¼¾ÖһϾÍÂÒµôÁË¡£ÊÔÁ˼¸´Î¶¼ÊÇÈç´Ë£¬ÏëÁËһϣ¬ÊDz»ÊÇÔÚ ......

³¹µ×Ū¶®CSSºÐ×Óģʽ(DIV+CSS)

³¹µ×Ū¶®CSSºÐ×Óģʽ(DIV+CSS)
·Ç³£ºÃµÄDIV²¼¾ÖÔ­ÀíÓëʵÀý½Ì³Ì,¶ÔWEB±ê×¼²¼¾ÖÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ¿´¿´ÒÔÏÂÄÚÈÝ:
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×Óģʽһ:DIV²¼¾Ö¿ìËÙÈëÃÅ
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×Óģʽ¶þ:µ¼º½À¸ÊµÀýÏê½â
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×ÓģʽÈý:¸¡¶¯µÄ±íÑݺÍÇå³ýµÄ×ÔÊö[1]
Web±ê×¼,³¹µ×Ū¶®CSSºÐ×ÓģʽÈý:¸¡¶¯µÄ±íÑݺÍÇå³ý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ