gpt4 book ai didi

c# - asp.net CSS 中的母版页

转载 作者:行者123 更新时间:2023-11-28 01:56:23 25 4
gpt4 key购买 nike

My masterpage code:
<head runat="server">
<title>System</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style>
.masterfixed { table-layout:fixed; color:rebeccapurple}
.masterfixed td { overflow: hidden;}
</style>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" >
<link href="bootstrap/css/masdesign.css" rel="stylesheet" type="text/css" >

我只想在母版页上使用我的颜色。但是为什么这适用于我的内容占位符中的所有字体。请帮忙谢谢。

最佳答案

您可以将 contentplaceholder 放在一个 div 中,并为 div 指定 CSS 类或您想要的样式:

<div style="font:bold 12px arial;color:#000000">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</div>

如果它不起作用,请在每个样式的末尾添加 !important 进行尝试:
sytle="color:#000000 !important"

这确保 div 使用此样式而不是 CSS 类中定义的样式。

关于c# - asp.net CSS 中的母版页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49604620/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com