我有一個我爲WordPress創建的頁腳菜單。我有我的主要導航鏈接,最後我想要一個社交圖標的摺疊/擴展鏈接。我已經分別創建了兩個,但不知道如何使它們在一行上顯示。任何幫助表示讚賞。使用CSS(導航菜單)在同一行顯示多個div
主導航:
<!DOCTYPE html>
<html>
<head>
<style>
#footernav {
width: 100%;
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-weight:bold;
text-align: center;
}
#footernav li {
margin-right: 20px;
display: inline;
}
</style>
</head>
<body>
<div id="footernav">
<li><a href="#hi">Customer Care</a></li>
<li><a href="#hi">Privacy Policy</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Newsletter</a></li>
<li><a href="#">Contact</a></li>
</div>
</body>
</html>
展開/摺疊的社交關係:
<!DOCTYPE html>
<html>
<body>
<style type="text/css">
/*SOCIAL*/
.list {
display:none;
height:auto;
margin:0;
float: center;
}
.show {
display: none;
}
.hide:target + .show {
display: inline;
}
.hide:target {
display: none;
}
.hide:target ~ .list {
display:inline;
}
.hide:hover, .show:hover {
color: #eee;
font-weight: bold;
opacity: 1;
margin-bottom: 25px;
}
.list p {
height:auto;
margin:0;
.hover:hover {
-moz-box-shadow: 0 0 5px #000;
-webkit-box-shadow: 0 0 5px #000;
box-shadow: 0px 0px 5px #000
}
/*END SOCIAL*/
</style>
<div class='social'>
<a href="#show" class="hide" id="show" style=" font-family: Times New Roman, Georgia, Serif; font-size:14px;font-weight:bold;">Follow Us (+)</a>
<a href="#hide" class="show" id="show" style=" font-family: Times New Roman, Georgia, Serif; font-size: 14px;font-weight:bold;">Follow Us (-)</a>
<div class="list">
<p>
<a href="http://www.facebook.com" target= "_blank" ><img src="http://museiam.ca/wp-content/uploads/Facebook.png" onmouseover="this.src='http://museiam.ca/wp-content/uploads/Facebook1.png'" onmouseout="this.src='http://museiam.ca/wp-content/uploads/Facebook.png'" ></a>
<a href="http://www.twitter.com" target= "_blank1" ><img src="http://museiam.ca/wp-content/uploads/Twitter.png" onmouseover="this.src='http://museiam.ca/wp-content/uploads/Twitter1.png'" onmouseout="this.src='http://museiam.ca/wp-content/uploads/Twitter.png'" ></a>
<a href="http://www.instagram.com" target= "_blank2" ><img src="http://museiam.ca/wp-content/uploads/Instagram.png" onmouseover="this.src='http://museiam.ca/wp-content/uploads/Instagram1.png'" onmouseout="this.src='http://museiam.ca/wp-content/uploads/Instagram.png'" ></a>
</p>
</div>
</div>
</body>
</html>
FIDDLE:http://jsfiddle.net/7j0nb4az/
更好提供一個小提琴,如果你真的需要幫助。 – ProllyGeek 2014-11-04 01:00:42
請創建一個jsFiddle或提供一個鏈接到您的網站。 – 2014-11-04 01:05:00
將小提琴添加到主帖。謝謝。 – crazythedon 2014-11-04 01:07:12