提要:我们都知道Volantis主题标签的样式非常好看,也算是该主题的一大特色,那是否可以移植到自己主题呢?当然可以,这里以butterfly主题为例,先看下修改后的标签效果吧!
更多效果可以参考我的博客:
https://lovelijunyi.gitee.io/posts/c898.html
先去https://github.com/xaoxuu/volantis-docs/
clone下volantis主题所有文件
然后将hexo-theme-volantis-master\scripts\tags中的所有js放到Butterfly\scripts\tags,出现覆盖的覆盖掉,接着外挂css和js就可以啦!css和js代码在下面给出
最后提示:这里需要打开fontawesome_v5
/* eslint-disable */
(function ($) {
"use strict";
function setTabs() {
const $tabs = $(".tabs");
if ($tabs.length === 0) return;
let $navs = $tabs.find(".nav-tabs .tab");
for (var i = 0; i < $navs.length; i++) {
let $a = $tabs.find($navs[i].children[0]);
$a.addClass($a.attr("href"));
$a.removeAttr("href");
}
$(".tabs .nav-tabs").on("click", "a", (e) => {
e.preventDefault();
e.stopPropagation();
let $tab = $(e.target.parentElement.parentElement.parentElement);
$tab.find(".nav-tabs .active").removeClass("active");
$tab.find(e.target.parentElement).addClass("active");
$tab.find(".tab-content .active").removeClass("active");
$tab.find($(e.target).attr("class")).addClass("active");
return false;
});
}
$(function () {
setTabs();
// $(".article .video-container").fitVids();
$(".scroll-down").on("click", function () {
scrolltoElement(".l_body");
});
setTimeout(function () {
$("#loading-bar-wrapper").fadeOut(500);
}, 300);
});
})(jQuery);
更多效果可以参考我的博客:
https://lovelijunyi.gitee.io/posts/c898.html
接着来说下怎么改
* {
box-sizing: border-box;
outline: none;
margin: 0;
padding: 0;
}
details {
display: block;
padding: 20px;
margin: 0.5rem 0;
border-radius: 4px;
background: #fff;
font-size: 0.9375rem;
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
border: 1px solid #f6f6f6;
}
summary {
display: block;
}
details summary {
cursor: pointer;
padding: 16px;
margin: -20px;
border-radius: 4px;
color: rgba(85, 85, 85, 0.7);
font-size: 0.875rem;
font-weight: bold;
position: relative;
line-height: normal;
}
details summary > p,
details summary > h1,
details summary > h2,
details summary > h3,
details summary > h4,
details summary > h5,
details summary > h6 {
display: inline;
border-bottom: none !important;
}
details summary:hover {
color: #555;
}
details summary:hover:after {
position: absolute;
content: "+";
text-align: center;
top: 50%;
transform: translateY(-50%);
right: 16px;
}
details > summary {
background: #f6f6f6;
}
details[blue] {
border-color: #e8f4fd;
}
details[blue] > summary {
background: #e8f4fd;
}
details[cyan] {
border-color: #e8fafe;
}
details[cyan] > summary {
background: #e8fafe;
}
details[green] {
border-color: #ebf9ed;
}
details[green] > summary {
background: #ebf9ed;
}
details[yellow] {
border-color: #fff8e9;
}
details[yellow] > summary {
background: #fff8e9;
}
details[red] {
border-color: #feefee;
}
details[red] > summary {
background: #feefee;
}
details[open] {
border-color: rgba(85, 85, 85, 0.2);
}
details[open] > summary {
border-bottom: 1px solid rgba(85, 85, 85, 0.2);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
details[open][blue] {
border-color: rgba(33, 150, 243, 0.3);
}
details[open][blue] > summary {
border-bottom-color: rgba(33, 150, 243, 0.3);
}
details[open][cyan] {
border-color: rgba(27, 205, 252, 0.3);
}
details[open][cyan] > summary {
border-bottom-color: rgba(27, 205, 252, 0.3);
}
details[open][green] {
border-color: rgba(61, 197, 80, 0.3);
}
details[open][green] > summary {
border-bottom-color: rgba(61, 197, 80, 0.3);
}
details[open][yellow] {
border-color: rgba(255, 189, 43, 0.3);
}
details[open][yellow] > summary {
border-bottom-color: rgba(255, 189, 43, 0.3);
}
details[open][red] {
border-color: rgba(254, 95, 88, 0.3);
}
details[open][red] > summary {
border-bottom-color: rgba(254, 95, 88, 0.3);
}
details[open] > summary {
color: #555;
margin-bottom: 0;
}
details[open] > summary:hover:after {
content: "-";
}
details[open] > div.content {
padding: 16px;
margin: -16px;
margin-top: 0;
}
/*note标签*/
div.note {
position: relative;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
padding: 0.6rem 16px 0.5rem 16px;
padding-left: calc(16px + 16px);
border-radius: 4px;
background: #f6f6f6;
border-left: 4px solid #767676;
}
div.note h2,
div.note h3,
div.note h4,
div.note h5,
div.note h6 {
margin-top: 3px;
margin-bottom: 0;
padding-top: 0 !important;
border-bottom: initial;
}
div.note p,
div.note ul,
div.note ol,
div.note blockquote,
div.note img {
font-size: 14px;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
div.note::before {
position: absolute;
top: calc(50% - 24px * 0.5);
left: 4px;
width: 24px;
height: 24px;
text-align: center;
font-weight: 600;
line-height: 24px;
vertical-align: middle;
font-family: 'Font Awesome 5 Free';
}
div.note::before {
color: #767676;
content: '\f054';
}
div.note::before {
content: '\f054';
}
div.note.quote {
background: #e8f4fd;
border-color: #2196f3;
}
div.note.quote::before {
color: #2196f3;
content: '\f10d';
}
div.note.info {
background: #e8f4fd;
border-color: #2196f3;
}
div.note.info::before {
color: #2196f3;
content: '\f129';
}
div.note.success,
div.note.done {
background: #ebf9ed;
border-color: #3dc550;
}
div.note.success::before,
div.note.done::before {
color: #3dc550;
content: '\f00c';
}
div.note.warning {
background: #fff8e9;
border-color: #ffbd2b;
}
div.note.warning::before {
color: #ffbd2b;
content: '\f12a';
}
div.note.danger,
div.note.error {
background: #feefee;
border-color: #fe5f58;
}
div.note.danger::before,
div.note.error::before {
color: #fe5f58;
content: '\f00d';
}
div.note.radiation::before {
content: '\f7b9';
}
div.note.bug::before {
content: '\f188';
}
div.note.idea::before {
content: '\f0eb';
}
div.note.link::before {
content: '\f0c1';
}
div.note.paperclip::before {
content: '\f0c6';
}
div.note.todo::before {
content: '\f0ae';
}
div.note.message::before {
content: '\f4ad';
}
div.note.guide::before {
content: '\f277';
}
div.note.download::before {
content: '\f019';
}
div.note.up::before {
content: '\f102';
}
div.note.undo::before {
content: '\f2ea';
}
div.note.play::before {
content: '\f144';
}
div.note.clear {
background: none;
border-color: none;
}
div.note.light {
background: #f6f6f6;
border-color: #aaa;
}
div.note.light::before {
color: #aaa;
}
div.note.gray {
background: #f6f6f6;
border-color: #767676;
}
div.note.gray::before {
color: #767676;
}
div.note.red {
background: #feefee;
border-color: #fe5f58;
}
div.note.red::before {
color: #fe5f58;
}
div.note.yellow {
background: #fff8e9;
border-color: #ffbd2b;
}
div.note.yellow::before {
color: #ffbd2b;
}
div.note.green {
background: #ebf9ed;
border-color: #3dc550;
}
div.note.green::before {
color: #3dc550;
}
div.note.cyan {
background: #e8fafe;
border-color: #1bcdfc;
}
div.note.cyan::before {
color: #1bcdfc;
}
div.note.blue {
background: #e8f4fd;
border-color: #2196f3;
}
div.note.blue::before {
color: #2196f3;
}
/*note标签结束*/
/*文字标签*/
p.p.subtitle {
font-weight: bold;
color: #2196f3;
padding-top: 1rem;
}
p.p.subtitle:first-child {
padding-top: 0.5rem;
}
span.p.logo,
p.p.logo {
font-family: "Varela Round", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, Helvetica, monospace;
}
span.p.code,
p.p.code {
font-family: Menlo, UbuntuMono, Monaco, monospace, courier, sans-serif;
}
span.p.left,
p.p.left {
display: block;
text-align: left;
}
span.p.center,
p.p.center {
display: block;
text-align: center;
}
span.p.right,
p.p.right {
display: block;
text-align: right;
}
span.p.small,
p.p.small {
font-size: 0.875rem;
}
span.p.large,
p.p.large {
font-size: 3rem;
line-height: 1.4;
}
span.p.huge,
p.p.huge {
font-size: 4rem;
line-height: 1.4;
}
span.p.ultra,
p.p.ultra {
font-size: 6rem;
line-height: 1.4;
}
span.p.small,
p.p.small,
span.p.large,
p.p.large,
span.p.huge,
p.p.huge,
span.p.ultra,
p.p.ultra {
margin: 0;
padding: 0;
}
span.p.bold,
p.p.bold {
font-weight: bold;
}
span.p.h1,
p.p.h1 {
font-size: 1.625rem;
color: #555;
padding-top: 1rem;
}
span.p.h2,
p.p.h2 {
font-size: 1.375rem;
color: #555;
padding-top: 1rem;
border-bottom: 1px solid rgba(85,85,85,0.1);
}
span.p.h3,
p.p.h3 {
font-size: 1.25rem;
color: #2196f3;
padding-top: 1rem;
}
span.p.h4,
p.p.h4 {
font-size: 1.125rem;
color: #555;
padding-top: 1rem;
}
span.p.red,
p.p.red {
color: #fe5f58;
}
span.p.yellow,
p.p.yellow {
color: #ffbd2b;
}
span.p.green,
p.p.green {
color: #3dc550;
}
span.p.cyan,
p.p.cyan {
color: #1bcdfc;
}
span.p.blue,
p.p.blue {
color: #2196f3;
}
span.p.gray,
p.p.gray {
color: #666;
}
/*文字标签结束*/
div.tabs {
display: block;
position: relative;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
border-radius: 4px;
background: #fff;
border: 1px solid rgba(85, 85, 85, 0.2);
font-size: 0.7375rem;
}
.tab::before {
content: none !important;
}
div.tabs ul li {
padding: 0 !important;
margin: 0 !important;
}
div.tabs ul li a {
border-radius: 0;
}
[data-theme="dark"] div.tabs {
border-radius: 2px;
border-color: rgba(0, 0, 0, 0.8);
}
[data-theme="dark"] div.tabs ul.nav-tabs {
background: rgba(0, 0, 0, 0.8);
color: white;
filter: brightness(0.7);
}
[data-theme="dark"] div.tabs .tab-content .tab-pane {
background: rgba(0, 0, 0, 0.8);
color: rgba(255, 255, 255, 0.7);
}
div.tabs .highlight,
div.tabs details,
div.tabs div.note,
div.tabs ol,
div.tabs p,
div.tabs ul {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
div.tabs ul.nav-tabs {
display: -ms-flexbox;
display: flex;
overflow-x: auto;
white-space: nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
margin: 0 !important;
padding: 0 !important;
background: #f6f6f6;
border-radius: 4px 4px 0 0;
line-height: 1.4em;
}
div.tabs ul.nav-tabs li.tab {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
}
div.tabs ul.nav-tabs li.tab:last-child {
padding-right: 16px;
}
div.tabs ul.nav-tabs li.tab a {
display: block;
cursor: pointer;
border-radius: 4px 4px 0 0;
padding: 8px;
text-align: center;
line-height: inherit;
font-weight: 700;
color: rgba(68, 68, 68, 0.65);
border: 1px solid transparent;
}
div.tabs ul.nav-tabs li.tab a:hover {
color: #555;
}
div.tabs ul.nav-tabs li.tab.active a {
cursor: default;
color: #555;
background: #fff;
border: 1px solid rgba(85, 85, 85, 0.2);
border-bottom: 1px solid #fff;
}
div.tabs .tab-content {
border-top: 1px solid rgba(85, 85, 85, 0.2);
margin-top: -1px;
}
div.tabs .tab-content .tab-pane {
padding: 16px;
}
div.tabs .tab-content .tab-pane:not(.active) {
display: none;
opacity: 0;
}
div.tabs .tab-content .tab-pane.active {
display: block;
opacity: 1;
}
div.tabs .tab-content .tab-pane > .fancybox:first-child,
div.tabs .tab-content .tab-pane > .highlight:first-child,
div.tabs .tab-content .tab-pane > .note:first-child,
div.tabs .tab-content .tab-pane > .tabs:first-child,
div.tabs .tab-content .tab-pane > ol:first-child,
div.tabs .tab-content .tab-pane > p:first-child,
div.tabs .tab-content .tab-pane > ul:first-child {
margin-top: 0;
}
div.tabs .tab-content .tab-pane > .fancybox:last-child,
div.tabs .tab-content .tab-pane > .highlight:last-child,
div.tabs .tab-content .tab-pane > .note:last-child,
div.tabs .tab-content .tab-pane > .tabs:last-child,
div.tabs .tab-content .tab-pane > ol:last-child,
div.tabs .tab-content .tab-pane > p:last-child,
div.tabs .tab-content .tab-pane > ul:last-child {
margin-bottom: 0;
}
div.btns {
margin: 0 -8px;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: start;
align-items: flex-start;
overflow: visible;
}
[data-theme="dark"] div.btns {
filter: brightness(0.7);
}
[data-theme="dark"] div.btns a {
background: 0 0;
}
div.btns,
div.btns a,
div.btns p {
font-size: 0.8125rem;
color: #555;
}
div.btns b {
font-size: 0.875rem;
}
.btns img {
margin: 0 !important;
}
div.btns.wide > a {
padding-left: 32px;
padding-right: 32px;
}
div.btns.fill > a {
-ms-flex-positive: 1;
flex-grow: 1;
width: auto;
}
div.btns.around {
-ms-flex-pack: distribute;
justify-content: space-around;
}
div.btns.center {
-ms-flex-pack: center;
justify-content: center;
}
div.btns.grid2 > a {
width: calc(100% / 2 - 16px);
}
@media screen and (max-width: 1024px) {
div.btns.grid2 > a {
width: calc(100% / 2 - 16px);
}
}
@media screen and (max-width: 768px) {
div.btns.grid2 > a {
width: calc(100% / 2 - 16px);
}
}
@media screen and (max-width: 500px) {
div.btns.grid2 > a {
width: calc(100% / 1 - 16px);
}
}
div.btns.grid3 > a {
width: calc(100% / 3 - 16px);
}
@media screen and (max-width: 1024px) {
div.btns.grid3 > a {
width: calc(100% / 3 - 16px);
}
}
@media screen and (max-width: 768px) {
div.btns.grid3 > a {
width: calc(100% / 3 - 16px);
}
}
@media screen and (max-width: 500px) {
div.btns.grid3 > a {
width: calc(100% / 1 - 16px);
}
}
div.btns.grid4 > a {
width: calc(100% / 4 - 16px);
}
@media screen and (max-width: 1024px) {
div.btns.grid4 > a {
width: calc(100% / 3 - 16px);
}
}
@media screen and (max-width: 768px) {
div.btns.grid4 > a {
width: calc(100% / 3 - 16px);
}
}
@media screen and (max-width: 500px) {
div.btns.grid4 > a {
width: calc(100% / 2 - 16px);
}
}
div.btns.grid5 > a {
width: calc(100% / 5 - 16px);
}
@media screen and (max-width: 1024px) {
div.btns.grid5 > a {
width: calc(100% / 4 - 16px);
}
}
@media screen and (max-width: 768px) {
div.btns.grid5 > a {
width: calc(100% / 3 - 16px);
}
}
@media screen and (max-width: 500px) {
div.btns.grid5 > a {
width: calc(100% / 2 - 16px);
}
}
div.btns a {
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
margin: 8px;
margin-top: calc(1.25 * 16px + 32px);
min-width: 120px;
font-weight: 700;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: start;
justify-content: flex-start;
-ms-flex-line-pack: center;
align-content: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-direction: column;
flex-direction: column;
padding: 8px;
text-align: center;
background: #f6f6f6;
border-radius: 4px;
}
div.btns a > i:first-child,
div.btns a > img:first-child {
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
height: 64px;
width: 64px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
margin: 16px 8px 4px 8px;
margin-top: calc(-1.25 * 16px - 32px);
border: 2px solid #fff;
background: #fff;
line-height: 60px;
font-size: 28px;
}
div.btns a > i:first-child.auto,
div.btns a > img:first-child.auto {
width: auto;
}
div.btns a > i:first-child {
color: #fff;
background: #2196f3;
}
div.btns a b,
div.btns a p {
margin: 0.25em;
font-weight: 400;
line-height: 1.25;
word-wrap: break-word;
}
div.btns a b {
font-weight: 700;
line-height: 1.3;
}
div.btns a img {
margin: 0.4em auto;
}
div.btns a:not([href]) {
cursor: default;
color: inherit;
}
div.btns a[href]:hover {
background: rgba(255, 87, 34, 0.15);
}
div.btns a[href]:hover,
div.btns a[href]:hover b {
color: #ff5722;
}
div.btns a[href]:hover > i:first-child,
div.btns a[href]:hover > img:first-child {
transform: scale(1.1) translateY(-8px);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
}
div.btns a[href]:hover > i:first-child {
background: #ff5722;
}
div.btns.circle a > i:first-child,
div.btns.circle a > img:first-child {
border-radius: 32px;
}
div.btns.rounded a > i:first-child,
div.btns.rounded a > img:first-child {
border-radius: 16px;
}
/*checkbox*/
.checkbox {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
}
.checkbox input {
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
position: relative;
height: 16px;
width: 16px;
transition: all 0.15s ease-out 0s;
cursor: pointer;
display: inline-block;
outline: 0;
border-radius: 2px;
-ms-flex-negative: 0;
flex-shrink: 0;
margin-right: 8px;
}
[data-theme="dark"] .checkbox {
filter: brightness(0.7);
}
.checkbox input[type="checkbox"]:after,
.checkbox input[type="checkbox"]:before {
position: absolute;
content: "";
background: #fff;
}
.checkbox input[type="checkbox"]:before {
left: 1px;
top: 5px;
width: 0;
height: 2px;
transition: all 0.2s ease-in;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:after {
right: 7px;
bottom: 3px;
width: 2px;
height: 0;
transition: all 0.2s ease-out;
transform: rotate(40deg);
-webkit-transform: rotate(40deg);
-moz-transform: rotate(40deg);
-ms-transform: rotate(40deg);
-o-transform: rotate(40deg);
transition-delay: 0.25s;
}
.checkbox input[type="checkbox"]:checked:before {
left: 0;
top: 7px;
width: 6px;
height: 2px;
}
.checkbox input[type="checkbox"]:checked:after {
right: 3px;
bottom: 1px;
width: 2px;
height: 10px;
}
.checkbox.minus input[type="checkbox"]:before {
transform: rotate(0);
left: 1px;
top: 5px;
width: 0;
height: 2px;
}
.checkbox.minus input[type="checkbox"]:after {
transform: rotate(0);
left: 1px;
top: 5px;
width: 0;
height: 2px;
}
.checkbox.minus input[type="checkbox"]:checked:before {
left: 1px;
top: 5px;
width: 10px;
height: 2px;
}
.checkbox.minus input[type="checkbox"]:checked:after {
left: 1px;
top: 5px;
width: 10px;
height: 2px;
}
.checkbox.plus input[type="checkbox"]:before {
transform: rotate(0);
left: 1px;
top: 5px;
width: 0;
height: 2px;
}
.checkbox.plus input[type="checkbox"]:after {
transform: rotate(0);
left: 5px;
top: 1px;
width: 2px;
height: 0;
}
.checkbox.plus input[type="checkbox"]:checked:before {
left: 1px;
top: 5px;
width: 10px;
height: 2px;
}
.checkbox.plus input[type="checkbox"]:checked:after {
left: 5px;
top: 1px;
width: 2px;
height: 10px;
}
.checkbox.times input[type="checkbox"]:before {
transform: rotate(45deg);
left: 3px;
top: 1px;
width: 0;
height: 2px;
}
.checkbox.times input[type="checkbox"]:after {
transform: rotate(135deg);
right: 3px;
top: 1px;
width: 0;
height: 2px;
}
.checkbox.times input[type="checkbox"]:checked:before {
left: 1px;
top: 5px;
width: 10px;
height: 2px;
}
.checkbox.times input[type="checkbox"]:checked:after {
right: 1px;
top: 5px;
width: 10px;
height: 2px;
}
.checkbox input[type="radio"] {
border-radius: 50%;
}
.checkbox input[type="radio"]:before {
content: "";
display: block;
width: 8px;
height: 8px;
border-radius: 50%;
margin: 2px;
transform: scale(0);
transition: all 0.25s ease-out;
}
.checkbox input[type="radio"]:checked:before {
transform: scale(1);
}
.checkbox input {
border: 2px solid #2196f3;
}
.checkbox input[type="checkbox"]:checked {
background: #2196f3;
}
.checkbox input[type="radio"]:checked:before {
background: #2196f3;
}
.checkbox.red input {
border-color: #fe5f58;
}
.checkbox.red input[type="checkbox"]:checked {
background: #fe5f58;
}
.checkbox.red input[type="radio"]:checked:before {
background: #fe5f58;
}
.checkbox.green input {
border-color: #3dc550;
}
.checkbox.green input[type="checkbox"]:checked {
background: #3dc550;
}
.checkbox.green input[type="radio"]:checked:before {
background: #3dc550;
}
.checkbox.yellow input {
border-color: #ffbd2b;
}
.checkbox.yellow input[type="checkbox"]:checked {
background: #ffbd2b;
}
.checkbox.yellow input[type="radio"]:checked:before {
background: #ffbd2b;
}
.checkbox.cyan input {
border-color: #1bcdfc;
}
.checkbox.cyan input[type="checkbox"]:checked {
background: #1bcdfc;
}
.checkbox.cyan input[type="radio"]:checked:before {
background: #1bcdfc;
}
.checkbox.blue input {
border-color: #2196f3;
}
.checkbox.blue input[type="checkbox"]:checked {
background: #2196f3;
}
.checkbox.blue input[type="radio"]:checked:before {
background: #2196f3;
}
.checkbox p {
display: inline-block;
margin-top: 2px !important;
margin-bottom: 0 !important;
}
div.tabs details {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
div.dropmenu {
display: inline-block;
position: relative;
line-height: 2.4;
cursor: default;
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
color: rgba(85,85,85,0.85);
background: #f6f6f6;
border-radius: 4px;
border: 1px solid #e7e7e7;
padding: 0 16px;
padding-top: 1px;
font-size: 0.875rem;
font-weight: bold;
}
div.dropmenu:hover {
background: #e8f4fd;
border-color: #cce7fb;
}
div.dropmenu:hover >ul {
display: block;
margin-left: -8px;
margin-top: -4px;
}
div.dropmenu ul>li {
list-style: none;
}
div.dropmenu ul>li >a:hover {
text-decoration: none !important;
}
div.dropmenu .list-v .list-v {
left: calc(100% - 0.5 * 16px);
}
details {
display: block;
padding: 16px;
margin: 0.5rem 0;
border-radius: 4px;
font-size: 0.7375rem;
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
border: 1px solid #f6f6f6;
line-height: 1.3;
}
[data-theme="dark"] details {
filter: brightness(0.7);
}
details summary {
cursor: pointer;
padding: 16px;
margin: -16px;
border-radius: 4px;
color: rgba(85, 85, 85, 0.7);
font-size: 0.775rem;
font-weight: 700;
position: relative;
}
details summary > h1,
details summary > h2,
details summary > h3,
details summary > h4,
details summary > h5,
details summary > h6,
details summary > p {
display: inline;
border-bottom: none !important;
margin-top: 2px;
margin-bottom: 0;
}
details summary:hover {
color: #555;
}
details summary:hover:after {
position: absolute;
content: "+";
text-align: center;
top: 50%;
transform: translateY(-50%);
right: 16px;
}
details > summary {
background: #f6f6f6;
}
details[blue] {
border-color: #e8f4fd;
}
details[blue] > summary {
background: #e8f4fd;
}
details[cyan] {
border-color: #e8fafe;
}
details[cyan] > summary {
background: #e8fafe;
}
details[green] {
border-color: #ebf9ed;
}
details[green] > summary {
background: #ebf9ed;
}
details[yellow] {
border-color: #fff8e9;
}
details[yellow] > summary {
background: #fff8e9;
}
details[red] {
border-color: #feefee;
}
details[red] > summary {
background: #feefee;
}
details[open] {
border-color: rgba(85, 85, 85, 0.2);
}
details[open] > summary {
border-bottom: 1px solid rgba(85, 85, 85, 0.2);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
details[open][blue] {
border-color: rgba(33, 150, 243, 0.3);
}
details[open][blue] > summary {
border-bottom-color: rgba(33, 150, 243, 0.3);
}
details[open][cyan] {
border-color: rgba(27, 205, 252, 0.3);
}
details[open][cyan] > summary {
border-bottom-color: rgba(27, 205, 252, 0.3);
}
details[open][green] {
border-color: rgba(61, 197, 80, 0.3);
}
details[open][green] > summary {
border-bottom-color: rgba(61, 197, 80, 0.3);
}
details[open][yellow] {
border-color: rgba(255, 189, 43, 0.3);
}
details[open][yellow] > summary {
border-bottom-color: rgba(255, 189, 43, 0.3);
}
details[open][red] {
border-color: rgba(254, 95, 88, 0.3);
}
details[open][red] > summary {
border-bottom-color: rgba(254, 95, 88, 0.3);
}
details[open] > summary {
color: #555;
margin-bottom: 0;
}
details[open] > summary:hover:after {
content: "-";
}
details[open] > div.content {
padding: 16px;
margin: -16px;
margin-top: 0;
}
details[open] >div.content > p:first-child,
details[open] >div.content > .tabs:first-child,
details[open] >div.content > ul:first-child,
details[open] >div.content > ol:first-child,
details[open] >div.content > .highlight:first-child,
details[open] >div.content > .note:first-child,
details[open] >div.content > .fancybox:first-child,
details[open] >div.content > details:first-child {
margin-top: 0;
}
details[open] >div.content > p:last-child,
details[open] >div.content > .tabs:last-child,
details[open] >div.content > ul:last-child,
details[open] >div.content > ol:last-child,
details[open] >div.content > .highlight:last-child,
details[open] >div.content > .note:last-child,
details[open] >div.content > .fancybox:last-child,
details[open] >div.content > details:last-child {
margin-bottom: 0;
}
div.tabs .tab-content .tab-pane > p:first-child,
div.tabs .tab-content .tab-pane > .tabs:first-child,
div.tabs .tab-content .tab-pane > ul:first-child,
div.tabs .tab-content .tab-pane > ol:first-child,
div.tabs .tab-content .tab-pane > .highlight:first-child,
div.tabs .tab-content .tab-pane > .note:first-child,
div.tabs .tab-content .tab-pane > .fancybox:first-child {
margin-top: 0;
}
div.tabs .tab-content .tab-pane > p:last-child,
div.tabs .tab-content .tab-pane > .tabs:last-child,
div.tabs .tab-content .tab-pane > ul:last-child,
div.tabs .tab-content .tab-pane > ol:last-child,
div.tabs .tab-content .tab-pane > .highlight:last-child,
div.tabs .tab-content .tab-pane > .note:last-child,
div.tabs .tab-content .tab-pane > .fancybox:last-child {
margin-bottom: 0;
}
/*fancybox图片相关*/
div.gallery {
margin: 0.5rem 0;
overflow: hidden;
}
div.gallery >.fancybox,
div.gallery >p>.fancybox {
margin: 1px;
padding: 0;
position: relative;
}
div.gallery >.fancybox .image-caption,
div.gallery >p>.fancybox .image-caption {
opacity: 0;
transform: translateY(100%);
transition: all 0.3s ease;
pointer-events: none;
position: absolute;
width: 100%;
bottom: 0;
text-align: center;
background: rgba(0,0,0,0.3);
color: #fff;
}
div.gallery >.fancybox .image-caption:empty,
div.gallery >p>.fancybox .image-caption:empty {
display: none;
}
div.gallery >.fancybox:hover .image-caption,
div.gallery >p>.fancybox:hover .image-caption {
opacity: 1;
transform: translateY(0);
}
div.gallery,
div.gallery >p {
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
padding: 0 !important;
-ms-flex-align: stretch;
align-items: stretch;
}
div.gallery[col]>p {
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
div.gallery[col='2']>p>.fancybox {
width: calc(50% - 2 * 1px);
}
div.gallery[col='3']>p>.fancybox {
width: calc(33.33% - 2 * 1px);
}
div.gallery[col='4']>p>.fancybox {
width: calc(25% - 2 * 1px);
}
div.gallery[col='5']>p>.fancybox {
width: calc(20% - 2 * 1px);
}
div.gallery[col='6']>p>.fancybox {
width: calc(16.66% - 2 * 1px);
}
div.gallery[col='7']>p>.fancybox {
width: calc(14.2857% - 2 * 1px);
}
div.gallery[col='8']>p>.fancybox {
width: calc(12.5% - 2 * 1px);
}
div.gallery >p {
margin: 0;
}
div.gallery.left,
div.gallery.left>p {
-ms-flex-pack: start;
justify-content: flex-start;
}
div.gallery.center,
div.gallery.center>p {
-ms-flex-pack: center;
justify-content: center;
}
div.gallery.right,
div.gallery.right>p {
-ms-flex-pack: end;
justify-content: flex-end;
}
div.gallery.stretch,
div.gallery.stretch>p {
-ms-flex-align: stretch;
align-items: stretch;
}
div.gallery.stretch img,
div.gallery.stretch>p img {
transform: scale(1.5);
}
.fancybox-container .fancybox-stage {
cursor: zoom-out;
}
.fancybox {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
padding: 0 !important;
overflow: hidden;
border-radius: 2px;
}
@media screen and (max-width: 500px) {
.fancybox {
border-radius: 1px;
}
}
.fancybox a {
line-height: 0;
margin: 0;
-ms-flex-align: stretch;
align-items: stretch;
cursor: zoom-in;
}
.fancybox .gallery {
overflow: hidden;
}
.fancybox .image-caption {
font-size: 0.8125rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: rgba(85,85,85,0.65);
}
/*播放器相关*/
audio,
video {
border-radius: 4px;
max-width: 100%;
}
video {
z-index: 1;
transition: all 0.28s ease;
-moz-transition: all 0.28s ease;
-webkit-transition: all 0.28s ease;
-o-transition: all 0.28s ease;
}
video:hover {
box-shadow: 0 4px 8px 0px rgba(0,0,0,0.24), 0 8px 16px 0px rgba(0,0,0,0.24);
}
div.video {
line-height: 0;
text-align: center;
}
div.videos {
max-width: calc(100% + 2 * 4px);
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-pack: start;
justify-content: flex-start;
-ms-flex-align: end;
align-items: flex-end;
margin: 0.5rem -4px;
}
div.videos .video,
div.videos iframe {
width: 100%;
margin: 4px;
}
div.videos iframe {
border-radius: 4px;
width: 100%;
min-height: 300px;
}
div.videos.left {
-ms-flex-pack: start;
justify-content: flex-start;
}
div.videos.center {
-ms-flex-pack: center;
justify-content: center;
}
div.videos.right {
-ms-flex-pack: end;
justify-content: flex-end;
}
div.videos.stretch {
-ms-flex-align: stretch;
align-items: stretch;
}
div.videos[col='1'] .video,
div.videos[col='1'] iframe {
width: 100%;
}
div.videos[col='2'] .video,
div.videos[col='2'] iframe {
width: calc(50% - 2 * 4px);
}
div.videos[col='3'] .video,
div.videos[col='3'] iframe {
width: calc(33.33% - 2 * 4px);
}
div.videos[col='4'] .video,
div.videos[col='4'] iframe {
width: calc(25% - 2 * 4px);
}