问题描述
一半的 css 内容不适用于母版页 当我删除 css 页面并将 css 代码添加到母版页本身(没有两个单独的页面)时,css 工作完美
html
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MastrPage.master.cs" Inherits="Project.MastrPage" %>
<!DOCTYPE html>
<html>
<head runat="server">
<Meta charset="utf-8"/>
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" runat="server"/>
</head>
<body>
<header>
<p class="logo">jhkjhk</p>
<nav>
<ul class="nav_links">
<li><a href="HtmlPage3.aspx">דף 3</a></li>
<li><a href="HtmlPage2.aspx">דף 2</a></li>
<li><a href="HtmlPage1.aspx">דף 1</a></li>
</ul>
</nav>
<a href="#" class="cta"><button>dflksjf</button></a>
</header>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<table width="100%" border="1" class="footer">
<tr>
<td>אוהד רונן</td>
</tr>
</table>
</body>
</html>
据我所知 css 没有问题,但这里是
* {
Box-sizing: border-Box;
margin: 0;
padding: 0;
}
li,a,button {
font-family: "Montserrat",sans-serif;
font-weight: 500;
font-size: 16px;
color: #edf0f1;
text-decoration: none;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 10%;
background-color: #24252A;
position: fixed;
top: 0;
width: 100%;
}
.logo {
cursor: pointer;
font-family: 'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;
color: goldenrod;
font-size: 22px;
order: 3;
}
.nav_links {
list-style: none;
display: flex;
}
nav {
order: 2;
}
.cta {
order: 1;
}
.nav_links li {
display: inline-block;
padding: 0px 20px
}
.nav_links li a {
transition: all 0.3s ease 0s;
}
.nav_links li a:hover {
color: #ddad34;
}
button {
margin-left: 20px;
padding: 9px 25px;
background-color: goldenrod;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
}
button:hover {
background-color: #ddad34;
}
.content {
text-align: center;
font-size: 44px;
vertical-align: central;
position: absolute;
top: 3%;
right: 0;
left: 0;
height: 800px;
}
.footer {
text-align: center;
position: absolute;
top: 85%;
right: 0;
left: 0;
height: 130px;
}
a {
text-decoration: none;
color: white;
}
a:hover {
color: lightcyan;
cursor: pointer;
}
我真的不知道是什么问题 问题出在我已经尝试应用的 css 和母版页的连接之间 这 :href="~/StyleSheet.css" 它也不起作用
编辑:解决方案浏览器
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)