Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Click to Show or Hide Menu
Semantic HTML Quiz
Results
Settings
Embed
Delete
832
Views
588
Finishes
80
Average
How well do you know CSS?
Results
Settings
Embed
Delete
938
Views
856
Finishes
90
Average
Draft: Test Your JS Skills
Edit
Preview
Delete
0
Views
0
Finishes
0
Average
css
body { background: #e9f3f0; max-width: 70rem; margin: 0 auto; padding: 2rem 20px 3rem; font-family: "ff-tisa-sans-web-pro", Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma, sans-serif; -webkit-transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); } a { color: #4274b0; text-decoration: none; -webkit-transition: color .2s; transition: color .2s; -ms-touch-action: manipulation; touch-action: manipulation; } a:focus { outline: 1px dotted #4274b0; } a:hover, a:focus { color: #315581; } .dash-list { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-flow: row wrap; -ms-flex-flow: row wrap; flex-flow: row wrap; -webkit-box-align: stretch; -webkit-align-items: stretch; -ms-flex-align: stretch; align-items: stretch; list-style: none; margin-left: 0; } .dash-item { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-align-content: flex-end; -ms-flex-line-pack: end; align-content: flex-end; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; padding: 1.2rem 1.4rem 1rem; background: #fff; list-style: none; -webkit-transition: all .5s; transition: all .5s; margin: 0 0 0.8rem; position: relative; overflow: hidden; -webkit-transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); } @media (min-width: 500px) { .dash-item { -webkit-flex-basis: 49%; -ms-flex-preferred-size: 49%; flex-basis: 49%; margin: 0 2% 0.8rem 0; } .dash-item:nth-child(2n) { margin-right: 0; } } @media (min-width: 800px) { .dash-item { -webkit-flex-basis: 28%; -ms-flex-preferred-size: 28%; flex-basis: 28%; margin-right: 1.25%; } .dash-item:nth-child(2n) { margin-right: 1.25%; } .dash-item:nth-child(3n) { margin-right: 0; } } .dash-item--published { box-shadow: inset 4px 0 0 #3bb275, 0 1px 0 rgba(0, 0, 0, 0.1); } .dash-item--draft { box-shadow: inset 4px 0 0 #92dbb6, 0 1px 0 rgba(0, 0, 0, 0.1); } .dash-item__header { position: relative; z-index: 99; background: #fff; border-bottom: 1px solid #ddd; } .dash-item__title { font-size: 1rem; padding: 0 24px 0.5rem 0; margin: 0; } .dash-item__content { padding: 1.8rem 0 0.375rem; position: relative; -webkit-transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); } .dash-item__status { font-size: .7rem; font-weight: 300; text-transform: uppercase; color: #888; position: absolute; } .dash-item__nav { position: absolute; right: 1rem; list-style: none; margin: 0; padding: 0; } .dash-item__nav__item { display: inline-block; font-size: 0.85rem; margin-bottom: 0; padding-bottom: 0; margin-right: 10px; } .dash-item__nav__item:last-of-type { margin-right: 0; } .dash-item__nav--collapsible { display: none; position: absolute; background: #fff; bottom: auto; right: auto; top: 100%; margin-top: 0.2rem; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); -webkit-transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); transition: all 0.2s cubic-bezier(0, 0, 0.3, 1); } .dash-item__nav--collapsible .dash-item__nav__item { padding: 0.4rem 0; } .dash-item__menu-action { background: none; border: none; color: #444; padding: 0; position: absolute; bottom: 0; right: 0; cursor: pointer; } .dash-item__menu-action__icon { width: 24px; height: 24px; fill: #444; -webkit-transition: all 0.3s cubic-bezier(0, 0, 0.3, 1); transition: all 0.3s cubic-bezier(0, 0, 0.3, 1); } .dash-item__menu-action__icon--bottom { position: absolute; left: 0; } .dash-list--focus-one { background: #bcd4ce; } .dash-list--focus-one .dash-item { opacity: 0.675; } .dash-list--focus-one .dash-item--menu-active { -webkit-transform: translate3d(0, -3px, 0); transform: translate3d(0, -3px, 0); box-shadow: inset 4px 0 0 #3bb275, 0 2px 2px rgba(0, 0, 0, 0.2); opacity: 1; } .dash-item--menu-active .dash-item__menu-action__icon--bottom { -webkit-transform: translateY(-15.5%); transform: translateY(-15.5%); } .dash-item--menu-active .dash-item__menu-action__icon--top { -webkit-transform: rotateX(-180deg) translateY(0px); transform: rotateX(-180deg) translateY(0px); } .dash-item--menu-active .dash-item__nav--collapsible { display: block; -webkit-animation: slideInTop 0.25s cubic-bezier(0, 0, 0.3, 1) forwards; animation: slideInTop 0.25s cubic-bezier(0, 0, 0.3, 1) forwards; } .dash-item--menu-active .dash-item__content { opacity: 0.4; -webkit-transform: translate3d(0, 0.675rem, 0); transform: translate3d(0, 0.675rem, 0); } .quiz-results { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; list-style: none; margin: 0; padding: 0; text-align: center; } .quiz-results__item { margin: 0 2% 0 0; padding: 0; color: #454545; } @media (max-width: 280px) { .quiz-results__item { width: 100%; padding: 0; margin-bottom: 0.6rem; } } .quiz-results__number { font-size: 1.6rem; line-height: 1; position: relative; } .dash-item--draft .quiz-results__number { opacity: 0.5; } .quiz-results__number--average-score { color: #319461; } .quiz-results__number--average-score:after { content: '%'; font-size: .9rem; position: absolute; top: .3rem; right: -0.6rem; } .quiz-results__label { text-transform: uppercase; font-size: .7rem; font-weight: 300; color: #888; } @-webkit-keyframes slideInTop { 0% { opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @keyframes slideInTop { 0% { opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } .twitter__username-link { position: relative; top: 2rem; }
JavaScript
jQuery(document).ready(function($) { // add our class to the action menu to set the styles if javascript is enabled $('.dash-item__nav').each(function() { $(this).addClass('dash-item__nav--collapsible') .attr('aria-hidden', true) .before('
'); }); $(document).on('click', '.dash-item__menu-action', function() { var dashItem = $(this).closest('.dash-item'); if (dashItem.hasClass('dash-item--menu-active')) { // remove states from the active menu item removeActiveMenuStates(dashItem); $('body').removeClass('dash-list--focus-one'); } else { // remove states from any active menu item, if there is one var previouslyActiveMenu = $('.dash-item--menu-active'); if (0 < previouslyActiveMenu.length) { removeActiveMenuStates(previouslyActiveMenu); } // add in the active states to the clicked dashItem addActiveMenuStates(dashItem); // add a class to the body telling that there's a dashItem active $('body').addClass('dash-list--focus-one'); // move focus to first item in newly opened menu $('.dash-item__nav__item:eq(0) a', dashItem).focus(); } }); function addActiveMenuStates(dashItem) { // add the new active states in dashItem.addClass('dash-item--menu-active'); // button to activate the menu $('.dash-item__menu-action', dashItem).attr('aria-expanded', true); // menu $('.dash-item__nav', dashItem).attr('aria-hidden', false); } function removeActiveMenuStates(dashItem) { // dash item card dashItem.removeClass('dash-item--menu-active'); // button to activate the menu $('.dash-item__menu-action', dashItem).attr('aria-expanded', false) // menu $('.dash-item__nav', dashItem).attr('aria-hidden', true); } });
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>flexbox网格卡动作菜单-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号