我正在尝试使用 VS2010 在“添加项目”中提供的示例 ASP.NET Web 应用程序作为起点来构建一个 Web 应用程序。具体来说,我尝试使用选项卡式菜单,并更改其默认行为。特别是,我正在尝试更改选项卡颜色。嗯,这在设计器中是有效的。我可以将选项卡背景设置为白色,前景设置为红色,但是当我运行该应用程序时,它会以原始的单调颜色显示选项卡。换句话说,它忽略了我对样式表所做的更改。至少看起来是这样。我在这里缺少什么吗?
我想要的是这里:
尽管我对样式表进行了更改,但这就是我得到的:
< img src="https://i.sstatic.net/0n4V6.png" alt="运行时仍然是默认外观">
这是修改后的 CSS 元素,设计器遵循该元素,但在运行时被忽略显然:
div.menu ul li a, div.menu ul li a:visited
{
background-color: #ffffff;
border: 1px #4e667d solid;
color: #ff0000;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
我是难住了。
I am trying to build a web app using as starting point the sample ASP.NET Web Application that VS2010 makes available in the Add Projects. Specifically, I am trying to use the tabbed menu, and change its behavior from the default. In particular, I am trying to change the tab colors. Well, this works in the designer. I can make the tab background white and the foreground red, but when I run the app it displays the tabs in the original drab colors. It is ignoring the changes I am making to the stylesheet, in other words. Or so it appears at least. Is there something I am missing here?
What I want is here:
This is what I get, despite my changes to stylesheet:
Here is the modified CSS element, which the designer is conforming to, but at run time is being ignored apparently:
div.menu ul li a, div.menu ul li a:visited
{
background-color: #ffffff;
border: 1px #4e667d solid;
color: #ff0000;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
I am stumped.
发布评论
评论(1)
您是否尝试过刷新浏览器/清除缓存?
Have you tried refreshing the browser/ clearing the cache?