|
導讀網(wǎng)頁的本質(zhì)就是超級文本標記語言,通過結(jié)合使用其他的Web技術(如:腳本語言、公共網(wǎng)關接口、組件等),可以創(chuàng)造出功能強大的網(wǎng)頁。因而,超級文本標記語言是萬維網(wǎng)(Web)編程的基礎,也就是說萬維網(wǎng)是建立... 網(wǎng)頁的本質(zhì)就是超級文本標記語言,通過結(jié)合使用其他的Web技術(如:腳本語言、公共網(wǎng)關接口、組件等),可以創(chuàng)造出功能強大的網(wǎng)頁。因而,超級文本標記語言是萬維網(wǎng)(Web)編程的基礎,也就是說萬維網(wǎng)是建立在超文本基礎之上的。超級文本標記語言之所以稱為超文本標記語言,是因為文本中包含了所謂“超級鏈接”點。 本篇文章給大家?guī)淼膬?nèi)容是關于css3實現(xiàn)響應式滑動菜單的完整代碼,有一定的參考價值,有需要的朋友可以參考一下,希望對你有所幫助。<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS3滑動動畫菜單DEMO演示</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div>
<header>
<h1>CSS3響應式滑動菜單</h1>
</header>
<div class="main clearfix">
<nav id="menu">
<ul>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>Home</span>
</a>
</li>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>Services</span>
</a>
</li>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>Portfolio</span>
</a>
</li>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>Blog</span>
</a>
</li>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>The team</span>
</a>
</li>
<li>
<a href="#">
<span>
<i aria-hidden="true"></i>
</span>
<span>mail</span>
</a>
</li>
</ul>
</nav>
<div style="text-align:center;clear:both"><br>
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script><script src="/follow.js" type="text/javascript"></script></div>
</div>
</div><!-- /container -->
<script>
var changeClass = function (r,className1,className2) {
var regex = new RegExp("(?:^|\\s+)" + className1 + "(?:\\s+|$)");
if( regex.test(r.className) ) {
r.className = r.className.replace(regex,' '+className2+' ');
}
else{
r.className = r.className.replace(new RegExp("(?:^|\\s+)" + className2 + "(?:\\s+|$)"),' '+className1+' ');
}
return r.className;
};
var menuElements = document.getElementById('menu');
menuElements.insertAdjacentHTML('afterBegin','<button type="button" id="menutoggle" aria-hidden="true"><i aria-hidden="true"> </i> Menu</button>');
document.getElementById('menutoggle').onclick = function() {
changeClass(this, 'navtoogle active', 'navtoogle');
}
</script>
</body>
</html>相關推薦: CSS3響應式滑動菜單_html/css_WEB-ITnose JS+CSS實現(xiàn)簡單滑動門(滑動菜單)效果_javascript技巧 以上就是css3實現(xiàn)響應式滑動菜單的完整代碼的詳細內(nèi)容,更多請關注php中文網(wǎng)其它相關文章! 網(wǎng)站建設是一個廣義的術語,涵蓋了許多不同的技能和學科中所使用的生產(chǎn)和維護的網(wǎng)站。 |
溫馨提示:喜歡本站的話,請收藏一下本站!