Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Button Group: Red-Black;
Music
Shopping
Restaurants
Cinema
Button Group: 3D;
Music
Shopping
Restaurants
Cinema
Button Group: Orange;
Music
Shopping
Restaurants
Cinema
Button Group: POP;
Music
Shopping
Restaurants
Cinema
css
* { margin: 0; padding: 0; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 100; } .button-group { margin: 100px auto; width: 600px; margin-bottom: 30px; } .button-group h3 { color: #999; text-align: center; font-size: 16px; margin-bottom: 10px; } .button-group#redBlack .button { background: linear-gradient(135deg, #292929, #191919); border: none; width: 120px; height: 120px; padding: 20px; display: inline-block; margin: -4px; color: #F2070B; font-size: 14px; text-align: left; text-shadow: 0 0 10px rgba(181, 26, 30, 0.4); box-shadow: 0px 10px 30px rgba(28, 28, 28, 0.9); } .button-group#redBlack .button span { text-align: center; margin: 20px 0 20px 0; display: block; color: #fff; font-size: 32px; text-shadow: none; } .button-group#redBlack .button:hover { background: linear-gradient(-45deg, #292929, #191919); } .button-group#redBlack .button.active { background: #B51A1E; color: #fff; box-shadow: inset 0px 0px 30px rgba(28, 28, 28, 0.9); } .button-group#orange .button { background: #F25824; width: 120px; height: 120px; padding: 20px; display: inline-block; margin: 0 -3px; color: #fff; font-size: 14px; text-align: center; text-shadow: 0 0 10px rgba(181, 26, 30, 0.4); box-shadow: 0px 0px 1px rgba(255, 255, 255, 0.9), 0px 10px 10px 0 rgba(111, 111, 111, 0.4); } .button-group#orange .button span { text-align: center; margin: 10px 0 20px 0; display: block; font-size: 32px; text-shadow: none; } .button-group#orange .button:hover { background: #CA4B1E; } .button-group#orange .button.active { text-shadow: 0 0 10px #fff; color: #fff; box-shadow: inset 0px 15px 15px 5px rgba(162, 63, 24, 0.9); } .button-group#orange .button.active span { text-shadow: 0 0 20px #fff; } .button-group#thirdDimension .button { background: linear-gradient(135deg, #39414E, #4C5363); border: none; width: 120px; height: 120px; padding: 20px; display: inline-block; margin: 0 -2px 30px -3px; color: #F89B72; font-size: 14px; box-shadow: 0px 2px 15px #323A45; position: relative; } .button-group#thirdDimension .button span { text-align: center; margin: 20px 0 20px 0; display: block; color: #fff; text-shadow: 0 2px 30px #323A45; font-size: 32px; } .button-group#thirdDimension .button:hover { background: linear-gradient(135deg, #4C5363, #39414E); } .button-group#thirdDimension .button.active { font-size: 14px; text-shadow: 0 0 10px #fff; background: linear-gradient(135deg, #4C5363, #39414E); color: #fff; height: 100px; vertical-align: bottom; } .button-group#thirdDimension .button.active span { text-shadow: 0 0 10px #fff; margin-top: 10px; font-size: 20px; } .button-group#thirdDimension .button.next:before { content: ''; position: absolute; z-index: 11; left: -25px; top: 0px; line-height: 90px; border-bottom: 20px solid #323A45; border-left: 25px solid transparent; } .button-group#thirdDimension .button.next:after { content: ''; position: absolute; z-index: 11; left: -25px; top: 20px; line-height: 90px; border-top: 100px solid #323A45; border-left: 25px solid transparent; } .button-group#thirdDimension .button.prev:before { content: ''; position: absolute; z-index: 11; left: 100%; top: 20px; line-height: 90px; border-top: 100px solid #323A45; border-right: 25px solid transparent; } .button-group#thirdDimension .button.prev:after { content: ''; position: absolute; z-index: 11; left: 100%; top: 0px; line-height: 90px; border-bottom: 20px solid #323A45; border-right: 25px solid transparent; } .button-group#POP .button { background: #EBE9EA; border: none; width: 120px; height: 120px; padding: 20px; display: inline-block; margin: -2px; color: #6C68B4; font-size: 16px; text-align: right; } .button-group#POP .button span { text-align: center; margin: 20px 0 0 -30px; display: block; font-size: 54px; text-shadow: none; } .button-group#POP .button:hover { background: #6C68B4; color: #fff; } .button-group#POP .button.active { text-shadow: 0 0 10px rgba(181, 26, 30, 0.4); background: #6C68B4; color: #fff; transform: translate(10px, -10px); z-index: 100; box-shadow: -8px 8px 0px 2px rgba(28, 28, 28, 0.3); }
JavaScript
$(document).ready(function() { buttonClick('#redBlack'); buttonClick('#orange'); buttonClick('#POP'); buttonClickPN('#thirdDimension') }) function buttonClick(string) { $(string).find(".button").click(function() { if (!$(this).hasClass('active')) { $(string + ' .active').removeClass('active'); $(this).addClass('active'); } }) } function buttonClickPN(string) { $(string).find(".button").click(function() { if (!$(this).hasClass('active')) { $(string + ' .active').removeClass('active'); $(string + ' .prev').removeClass('prev'); $(string + ' .next').removeClass('next'); $(this).addClass('active'); $(this).prev().addClass('prev'); $(this).next().addClass('next'); } }) }
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>按钮选中效果-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号