博客侧边栏 html,博客侧边栏(支持Js代码).html

$.silence({

avatar: 'https://cdn.jsdelivr.net/gh/cungudafa/cdn/img/custom/cungudafa.jpg',

favicon: 'https://cungudafa.top/images/sakura.ico',

navigation: [

{

title: '标签',

url: 'https://www.cnblogs.com/cungudafa/tag/'

},

{

title: '归档',

url: 'https://www.cnblogs.com/cungudafa/p/'

},

{

title: '导航',

chilren: [

{

title: '谷歌',

url: 'https://www.google.com/',

},

{

title: '百度',

url: 'https://www.baidu.com/',

},

]

},

],

catalog: {

enable: true,

move: true,

index: true,

level1: 'h2',

level2: 'h3',

level3: 'h4',

},

signature: {

enable: true,

license: '署名-非商业性使用-相同方式共享 4.0 国际',

link: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',

remark: null

},

sponsor: {

enable: true,

paypal: null,

wechat: 'https://cdn.jsdelivr.net/gh/cungudafa/cdn@2.1.1/img/custom/donate/WeChanQR.jpg',

alipay: 'https://cdn.jsdelivr.net/gh/cungudafa/cdn@2.1.1/img/custom/donate/AliPayQR.jpg'

},

github: {

enable: true,

link: 'https://github.com/cungudafa',

target: '_self'

}

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个使用Bootstrap和jQuery实现导航侧边栏HTML代码示例: ```html <!DOCTYPE html> <html> <head> <title>Navigation Sidebar Example</title> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <!-- jQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <!-- Bootstrap JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <style> /* Sidebar styling */ .sidebar { height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #111; overflow-x: hidden; transition: 0.5s; padding-top: 60px; } .sidebar a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: #818181; display: block; transition: 0.3s; } .sidebar a:hover { color: #f1f1f1; } .sidebar .closebtn { position: absolute; top: 0; right: 25px; font-size: 36px; margin-left: 50px; } .openbtn { font-size: 20px; cursor: pointer; background-color: #111; color: white; padding: 10px 15px; border: none; } .openbtn:hover { background-color: #444; } /* Page content styling */ #main { transition: margin-left .5s; padding: 20px; } /* Responsive media query for smaller screens */ @media screen and (max-height: 450px) { .sidebar {padding-top: 15px;} .sidebar a {font-size: 18px;} } </style> </head> <body> <!-- Navigation sidebar --> <div id="mySidebar" class="sidebar"> <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a> <a href="#">Home</a> <a href="#">About</a> <a href="#">Services</a> <a href="#">Contact</a> </div> <!-- Page content --> <div id="main"> <button class="openbtn" onclick="openNav()">☰ Navigation</button> <h1>Welcome to my website!</h1> <p>This is an example of how to create a navigation sidebar using Bootstrap and jQuery.</p> </div> <script> // Open the sidebar function openNav() { document.getElementById("mySidebar").style.width = "250px"; document.getElementById("main").style.marginLeft = "250px"; } // Close the sidebar function closeNav() { document.getElementById("mySidebar").style.width = "0"; document.getElementById("main").style.marginLeft = "0"; } </script> </body> </html> ``` 这段代码实现了一个具有导航侧边栏的网页,点击“Navigation”按钮可以打开或关闭侧边栏。该示例使用了Bootstrap的CSS和JavaScript库以及jQuery库来实现导航侧边栏的样式和交互。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值