版权信息作为下一个菜单项,但我希望它作为居中文本出现在页脚内的下一行,所以请告诉我如何才能实现这一点。请帮忙。提前谢谢。
/* ----- FOOTER ----- */
.footer-nav{
display: flex;
flex-direction: row;
justify-content: space-between;
list-style: none;
text-align: center;
text-transform: uppercase;
background-color: #333;
padding: 50px;
font-size: 80%;
}
.footer-nav li{
flex-grow: 100%;
}
<div class="wrapper">
<ul class="footer-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">blah</a></li>
<li><a href="#"blah</a></li>
<li><a href="#">blah</a></li>
<p class = "copyright">aaa</p>
</ul>
</div>
答案 0 :(得分:0)
你可以做很多方法。如果您希望列表中包含版权,则需要将其包含在li
中,因为只有li
可以是ul
的孩子。然后,只需提供li
width: 100%
或flex-basis: 100%
,并将父级设为flex-wrap: wrap
.footer-nav {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
list-style: none;
text-align: center;
text-transform: uppercase;
background-color: #333;
padding: 50px 50px 25px;
font-size: 80%;
}
.footer-nav li {
flex-grow: 100%;
}
.copyright {
flex-basis: 100%;
margin-top: 25px;
}
<div class="wrapper">
<ul class="footer-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">blah</a></li>
<li><a href="#">blah</a></li>
<li><a href="#">blah</a></li>
<li class="copyright"><p>aaa</p></li>
</ul>
</div>
答案 1 :(得分:0)
下面的代码段
/* ----- FOOTER ----- */
p{
text-align:center;
}
.footer-nav{
display: flex;
flex-direction: row;
justify-content: space-between;
list-style: none;
text-align: center;
text-transform: uppercase;
padding: 50px;
padding-top:0;
padding-bottom:0;
font-size: 80%;
}
.footer-nav li{
flex-grow: 100%;
}
.wrapper{
background-color: #333;
}
<div class="wrapper">
<ul class="footer-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">blah</a></li>
<li><a href="#"blah</a></li>
<li><a href="#">blah</a></li>
</ul>
<p class = "copyright">aaa</p>
</div>
答案 2 :(得分:0)
我,你应该尝试使用footer
元素并将<ul>
置于<p>
之内,<ul>
之外的.footer-nav{
display: flex;
flex-direction: row;
justify-content: space-between;
list-style: none;
text-align: center;
text-transform: uppercase;
padding: 50px;
font-size: 80%;
}
footer{
background-color: #333;
}
.copyright{
text-align: center;
color: white;
}
.footer-nav li{
flex-grow: 100%;
}
使用特殊类来对文本进行居中。
CSS:
<div class="wrapper">
<footer>
<ul class="footer-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">blah</a></li>
<li><a href="#"</a>blah</li>
<li><a href="#">blah</a></li>
</ul>
<p class="copyright">aaa</p>
</footer>
</div>
和HTML:
string excelConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["xlsx"].ConnectionString + fileLocation;
//connection String for xls file format.
if (fileExtension == ".xls")
{
excelConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["xlsx"].ConnectionString + fileLocation;
}
//connection String for xlsx file format.
else if (fileExtension == ".xlsx")
{
excelConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["xlsx"].ConnectionString + fileLocation;
}
//Create Connection to Excel work book
OleDbConnection excelConnection = new OleDbConnection(excelConnectionString);
excelConnection.Open();