您可以使用Jquery包装函数来实现这一点。下面的代码将帮助您执行此操作。
<ul class="nav navbar-nav" id="hover_slip">
<li><a href="index.html">Home</a></li>
<li class="arrow_down"><a href="about.html">About Us</a>
<ul>
<li><a href="advisor.html">Advisor</a></li>
<li><a href="single-advisor.html">Single Advisor</a></li>
<li><a href="career.html">Career</a></li>
<li><a href="testimonial.html">Testimonaials</a></li>
<li><a href="partners.html">partners</a></li>
</ul>
</li>
<li class="arrow_down"><a href="service.html">Services</a>
<ul>
<li><a href="service2.html">Service Two</a></li>
<li><a href="pricing-page.html">Pricing Page</a></li>
</ul>
</li>
</ul>
<script>
jQuery(function($){
$(\'#hover_slip > li > ul\').wrap("<div class=\'sub-menu\'></div>");
});
</script>