伙计们,我的html中有以下代码。我正在使用320 bootstrap wp主题。我只是创建一个菜单。它的工作。但是上面的框没有移动到菜单到菜单。我是怎么做到的
更多解释。请访问以下链接。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Menu Tutorial - Cufon Font Script</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<!--CSS-->
<link href="styles/style.css" rel="stylesheet" type="text/css" />
<link href="styles/color.css" rel="stylesheet" type="text/css" />
<link href="styles/noscript.css" rel="stylesheet" type="text/css" id="noscript" media="screen,all" />
<!--End testimonial-->
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/Ebrima_400-Ebrima_700.font.js"></script>
<script type="text/javascript">
Cufon.replace('h1') ('h2') ('h3') ('h4') ('h5') ('h6') ('.nivo-caption h1', {textShadow: '#000 2px 0px 2px'}) ('.nivo-caption .button');
</script>
<script type="text/javascript" src="js/jquery.lavalamp.js"></script>
<script type="text/javascript" src="js/lavalamp-config.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.1.js"></script>
</head>
<body>
<div id="wrapper">
<div id="wrapper-top">
<div id="top">
<div id="top-left"><a href="index.html">
<img src="images/logo.png" alt="" width="223" height="58" />It's An Image</a></div><!-- #top-left -->
<div id="top-right">
<div id="nav">
<ul id="topnav">
<li class="active"><a href="index.html" >Home</a></li>
<li><a href="about.html">About Us</a>
</li>
<li><a href="services.html">Services</a>
<ul>
<li><a href="#">Services One</a></li>
<li><a href="#">Services Two</a></li>
<li><a href="#">Services Three</a></li>
<li><a href="#">Services Four</a></li>
</ul>
</li>
<li><a href="#">Portfolio</a>
<ul>
<li><a href="#">Portfolio One</a></li>
<li><a href="#">Portfolio Two</a></li>
<li><a href="#">Portfolio Three</a></li>
</ul>
</li>
<li><a href="contact.html">Contact</a></li>
</ul>
<!-- #topnav -->
</div><!-- #nav -->
</div><!-- #top-right -->
</div><!-- #top -->
</div><!-- #wrapper-top -->
<script type="text/javascript"> Cufon.now(); </script> <!-- to fix cufon problems in IE browser -->
<script type="text/javascript">jQuery('#noscript').remove();</script><!-- if javascript disable -->
</body>
</html>
解释
在这里寻求帮助
答案 0 :(得分:1)
有两种方法可以创建菜单。
get_pages
。<强> NO.1 强>
<ul>
<?php
$topparentofcurrent = getTopParentPostID($post->ID);
$alltoppages = get_pages('parent=0&hierarchical=0&sort_column=menu_order&sort_order=ASC');
foreach($alltoppages as $pages){ ?>
Your html code here to repeat in loop.
<li><?php echo $pages->post_title ?></li>
<?php } ?>
</ul>
<强>第2期强>
<div id="topMenu">
<div id="access">
<?php
$args = array(
'theme_location' => 'header_menu',
'menu' => 'Main Menu',
'sort_column' => 'menu_order',
'container_class' => 'menu-header'
);
wp_nav_menu($args);
?>
</div>
</div>
现在你需要在css中做样式,它只会自动显示父子行为。