css实现自适应响应式卡片式分类列表效果代码
代码语言:html
所属分类:响应式
代码描述:css实现自适应响应式卡片式分类列表效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html> <html lang="zh" class="no-js"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css"> <style> html * { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; } *,*:after,*:before { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } body { font-size:100%; font-family:"Ubuntu",sans-serif; color:#333; background-color:#ebe9d7; } a { color:#383838; text-decoration:none; } img { max-width:100%; } /* -------------------------------- Modules - reusable parts of our design-------------------------------- */.cd-container { width:90%; max-width:1200px; margin:0 auto; } .cd-container::after { /* clearfix */ content:''; display:table; clear:both; } /* -------------------------------- Main components -------------------------------- */.cd-gallery-container { margin:2em auto; } @media only screen and (min-width:1200px) { .cd-gallery-container { margin:4em auto; } }.cd-filter { position:relative; height:40px; width:150px; margin:0 auto; cursor:pointer; z-index:10; } .cd-filter::after { /* small arrow icon */ content:''; position:absolute; right:14px; top:50%; bottom:auto; -webkit-transform:translateY(-50%); -moz-transform:translateY(-50%); -ms-transform:translateY(-50%); -o-transform:translateY(-50%); transform:translateY(-50%); display:inline-block; width:16px; height:16px; background:url("//repo.bfw.wiki/bfwrepo/images/list/icon-small-arrow.svg") no-repeat center center; -webkit-transition:all 0.3s; -moz-transition:all 0.3s; transition:all 0.3s; pointer-events:none; } .cd-filter ul { position:absolute; top:0; left:0; background:#FFF; border-radius:0.25em; box-shadow:0 1px 2px rgba(0,0,0,0.1); } .cd-filter li { display:none; } .cd-filter li:first-child { display:block; /* this way the placehodler is alway visible */ } .cd-filter li:last-child a { border-radius:0 0 .25em .25em; } .cd-filter a { display:block; height:40px; width:150px; line-height:40px; padding-left:14px; font-size:14px; font-size:0.875rem; font-weight:700; text-transform:uppercase; } .cd-filter a.selected { background:#1a7179; colo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0