控制元件 應用css樣式
阿新 • • 發佈:2019-02-02
[html]
view plaincopyprint?
- <asp:MenuID="mnuTopMenu"runat="server"DynamicEnableDefaultPopOutImage="False"
- DynamicHorizontalOffset="-1"Font-Bold="false"Orientation="Horizontal"StaticEnableDefaultPopOutImage="False"
- StaticSubMenuIndent="10px"DisappearAfter="600"
- StaticSelectedStyle-CssClass="StaticSelectedStyle"
- StaticMenuItemStyle-CssClass="StaticMenuItemStyle"
- StaticHoverStyle-CssClass="StaticHoverStyle"
- DynamicMenuStyle-CssClass="DynamicMenuStyle"
- DynamicSelectedStyle-CssClass="DynamicSelectedStyle"
- DynamicMenuItemStyle-CssClass="DynamicMenuItemStyle"
- DynamicHoverStyle-CssClass="DynamicHoverStyle"
- onmenuitemclick
- <Items></Items>
- </asp:Menu>
<asp:Menu ID="mnuTopMenu" runat="server" DynamicEnableDefaultPopOutImage="False" DynamicHorizontalOffset="-1" Font-Bold="false" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" StaticSubMenuIndent="10px" DisappearAfter="600" StaticSelectedStyle-CssClass="StaticSelectedStyle" StaticMenuItemStyle-CssClass="StaticMenuItemStyle" StaticHoverStyle-CssClass="StaticHoverStyle" DynamicMenuStyle-CssClass="DynamicMenuStyle" DynamicSelectedStyle-CssClass="DynamicSelectedStyle" DynamicMenuItemStyle-CssClass="DynamicMenuItemStyle" DynamicHoverStyle-CssClass="DynamicHoverStyle" onmenuitemclick="mnuTopMenu_MenuItemClick" > <Items></Items> </asp:Menu>
css樣式如下:
[css] view plaincopyprint?- .mnuTopMenu
- {
- background-color:Transparent;
- font-family: 宋體;
- font-size: 12px;
- position:relative;
- top:34px;
- }
- .DynamicMenuStyle /*動態選單矩形區域樣式*/
- {
- background-color: white;
- border: solid1px#ACC3DF;
- padding: 1px1px1px1px;
- text-align: left;
- }
- .DynamicHoverStyle /*動態選單項:滑鼠懸停時的樣式*/
- {
- background-color: #F7DFA5; /*#7C6F57;*/
- color: #333333;
- }
- .DynamicSelectedStyle /*動態選單項:選擇時的樣式*/
- {
- /*background-color:Gainsboro;*/
- color: red;
- }
- .DynamicMenuItemStyle /*動態選單項樣式*/
- {
- padding: 2px5px2px5px;
- color: #333333;
- }
- .StaticSelectedStyle /*靜態選單項:選擇時的樣式*/
- {
- /*background-color:Gainsboro;*/
- color: red;
- }
- .StaticMenuItemStyle /*靜態選單項樣式*/
- {
- cursor: hand;
- padding: 2px5px2px5px;
- color: #333333;
- background-color::Transparent;
- }
- .StaticHoverStyle /*靜態選單項:滑鼠懸停時的樣式*/
- {
- background-color: #84BCCD; /*#7C6F57;*/
- cursor: hand;
- color: #333333;
- }