页面中的超链接的样式定义css样式如下:a { font-size: 13px; color: #0B4FA1; text-decoration: none}
a:hover { font-size: 13px; color: #FF3300; text-decoration: underline}结果页面中使用 ASP:Menu时,样式无法使用,当鼠标放到menuitem上时,使用的是上面的超链接的样式。。
但是页面中的LinkButton又不存在这样的问题,请问各位这是啥原因?如何解决ASP:Menu的样式问题???
a:hover { font-size: 13px; color: #FF3300; text-decoration: underline}结果页面中使用 ASP:Menu时,样式无法使用,当鼠标放到menuitem上时,使用的是上面的超链接的样式。。
但是页面中的LinkButton又不存在这样的问题,请问各位这是啥原因?如何解决ASP:Menu的样式问题???
解决方案 »
- 像qq空间那样可以拖动的设置布局咋弄的
- asp.net 数据丢失
- 在BLL层 怎么判断日期格式为2009-10
- 怎么我机子一关音量就卡死
- 如何让w3wp.exe进程占CPU达100% ?
- SQL语句无效
- 如何把byte数组转化为字符串?
- 在VS中新建项目出错(出错率100%)
- 有什么办法让SESSION失效的时候执行一个数据库操作?
- ObjectDataSource的SelectMethod函数为什么在我LOGOUT的时候也会自动调用?
- 怎么取出Object对象类型的值?在线等
- 在页面Grid中绑定了sqldatasource后,我现在使用一个callback调件我要在sqldatasource数据查询中mno等于传递的参数
StaticSubMenuIndent="4px">
<DynamicHoverStyle BackColor="#666666" ForeColor="White" />
<DynamicMenuStyle BackColor="#E3EAEB" />
<StaticMenuItemStyle HorizontalPadding="0px" VerticalPadding="1px" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="3px" />
<DynamicSelectedStyle BackColor="#1C5E55" />
</asp:Menu>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default17.aspx.cs" Inherits="Default17" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
a { font-size: 13px; color: #0B4FA1; text-decoration: none}
a:hover { font-size: 13px; color: #FF3300; text-decoration: underline}
.jsmenutext{
font-size:medium;
font-names:Verdana;
}
</style>
</head>
<body>
<form id="Form1" runat="server">
<h3>Menu DynamicMenuStyle Example</h3>
<asp:menu id="NavigationMenu"
staticdisplaylevels="2" DynamicHorizontalOffset="2"
staticsubmenuindent="10"
orientation="Horizontal" CssClass="jsmenutext"
target="_blank"
runat="server">
<dynamicmenustyle backcolor="LightSkyBlue"
forecolor="Black"
borderstyle="Solid"
borderwidth="1" CssClass="jsmenutext"
bordercolor="Black" />
<DynamicHoverStyle CssClass="jsmenutext" />
<items>
<asp:menuitem text="综合概述" Value="综合概述"
tooltip="综合概述" Selectable="false">
<asp:menuitem navigateurl="Music.aspx"
text="综合概述1"
tooltip="综合概述1">
<asp:menuitem navigateurl="Classical.aspx"
text="综合概述11"
tooltip="综合概述11"/>
<asp:menuitem navigateurl="Rock.aspx"
text="综合概述12"
tooltip="综合概述12"/>
<asp:menuitem navigateurl="Jazz.aspx"
text="综合概述13"
tooltip="综合概述13"/>
</asp:menuitem>
<asp:menuitem navigateurl="Movies.aspx"
text="综合概述2"
tooltip="综合概述2">
<asp:menuitem navigateurl="Action.aspx"
text="综合概述21"
tooltip="综合概述21"/>
<asp:menuitem navigateurl="Drama.aspx"
text="综合概述22"
tooltip="综合概述22"/>
<asp:menuitem navigateurl="Musical.aspx"
text="综合概述23"
tooltip="综合概述23"/>
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>
<br />
<asp:LinkButton ID="LinkButton1" Font-Names="Verdana" Font-Size="medium" runat="server">LinkButton</asp:LinkButton> </form></body>
</html>-------------------------------------------------------------
不理解的地方是,为什么LinkButton的字体是medium,而menu中的字体是13px呢???怎样让menu中的字体是样式
jsmenutext中所设置的medium呢???
jsmenutext中所设置的medium呢??? ==========================================
你自己设置的呀
把样式改为 <style type="text/css">
a { font-size: medium; color: #0B4FA1; text-decoration: none}
a:hover { font-size: medium; color: #FF3300; text-decoration: underline}
.jsmenutext{
font-size:medium;
font-names:Verdana;
}
</style>