图一 github callout,图二是我做的思源 callout
代码片段
/* callout_note*/
.bq[custom-cssclasses="callout_note"]{
border-left: .25em solid #1f6feb;
background-color: #1f71eb16 !important;
color: var(--b3-theme-on-background);
padding:15px !important;
border-radius: 0;
}
div[custom-cssclasses="callout_note"] > div:first-child > div:first-child {
color: #4493f8;
display:inline-flex;
align-items: center;
}
div[custom-cssclasses="callout_note"] > div:first-child > div:first-child:before {
content: "";
display: inline-block;
overflow: visible !important;
vertical-align: middle;
width: 22px;
height: 22px;
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjcxNDI4NTcxNDI4NTcxNDIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtY2lyY2xlLWFsZXJ0Ij48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPjxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iOCIgeTI9IjEyIi8+PGxpbmUgeDE9IjEyIiB4Mj0iMTIuMDEiIHkxPSIxNiIgeTI9IjE2Ii8+PC9zdmc+"); /* 设置为mask */
mask-size: cover;
background-color: currentColor;
margin-right: 10px;
mask-repeat: no-repeat;
}
/* Tip*/
.bq[custom-cssclasses="callout_tip"]{
border-left: .25em solid #238636;
background-color: #23863615 !important;
color: var(--b3-theme-on-background);
padding:15px !important;
border-radius: 0;
}
div[custom-cssclasses="callout_tip"] > div:first-child > div:first-child {
color: #238636;
display:inline-flex;
align-items: center;
}
div[custom-cssclasses="callout_tip"] > div:first-child > div:first-child:before {
content: "";
display: inline-block;
overflow: visible !important;
vertical-align: middle;
width: 22px;
height: 22px;
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjcxNDI4NTcxNDI4NTcxNDIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtbGlnaHRidWxiIj48cGF0aCBkPSJNMTUgMTRjLjItMSAuNy0xLjcgMS41LTIuNSAxLS45IDEuNS0yLjIgMS41LTMuNUE2IDYgMCAwIDAgNiA4YzAgMSAuMiAyLjIgMS41IDMuNS43LjcgMS4zIDEuNSAxLjUgMi41Ii8+PHBhdGggZD0iTTkgMThoNiIvPjxwYXRoIGQ9Ik0xMCAyMmg0Ii8+PC9zdmc+"); /* 设置为mask */
mask-size: cover;
background-color: currentColor;
margin-right: 10px;
mask-repeat: no-repeat;
}
/* Important*/
.bq[custom-cssclasses="callout_important"]{
border-left: .25em solid #8957e5;
background-color: #8957e515 !important;
color: var(--b3-theme-on-background);
padding:15px !important;
border-radius: 0;
}
div[custom-cssclasses="callout_important"] > div:first-child > div:first-child {
color: #8957e5;
display:inline-flex;
align-items: center;
}
div[custom-cssclasses="callout_important"] > div:first-child > div:first-child:before {
content: "";
display: inline-block;
overflow: visible !important;
vertical-align: middle;
width: 22px;
height: 22px;
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjcxNDI4NTcxNDI4NTcxNDIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtbWVzc2FnZS1zcXVhcmUtd2FybmluZyI+PHBhdGggZD0iTTIxIDE1YTIgMiAwIDAgMS0yIDJIN2wtNCA0VjVhMiAyIDAgMCAxIDItMmgxNGEyIDIgMCAwIDEgMiAyeiIvPjxwYXRoIGQ9Ik0xMiA3djIiLz48cGF0aCBkPSJNMTIgMTNoLjAxIi8+PC9zdmc+"); /* 设置为mask */
mask-size: cover;
background-color: currentColor;
margin-right: 10px;
mask-repeat: no-repeat;
}
/* Warning*/
.bq[custom-cssclasses="callout_warning"]{
border-left: .25em solid #9e6a03;
background-color: #9e6a0315 !important;
color: var(--b3-theme-on-background);
padding:15px !important;
border-radius: 0;
}
div[custom-cssclasses="callout_warning"] > div:first-child > div:first-child {
color: #9e6a03;
display:inline-flex;
align-items: center;
}
div[custom-cssclasses="callout_warning"] > div:first-child > div:first-child:before {
content: "";
display: inline-block;
overflow: visible !important;
vertical-align: middle;
width: 22px;
height: 22px;
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjcxNDI4NTcxNDI4NTcxNDIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtdHJpYW5nbGUtYWxlcnQiPjxwYXRoIGQ9Im0yMS43MyAxOC04LTE0YTIgMiAwIDAgMC0zLjQ4IDBsLTggMTRBMiAyIDAgMCAwIDQgMjFoMTZhMiAyIDAgMCAwIDEuNzMtMyIvPjxwYXRoIGQ9Ik0xMiA5djQiLz48cGF0aCBkPSJNMTIgMTdoLjAxIi8+PC9zdmc+"); /* 设置为mask */
mask-size: cover;
background-color: currentColor;
margin-right: 10px;
mask-repeat: no-repeat;
}
/* Caution*/
.bq[custom-cssclasses="callout_caution"]{
border-left: .25em solid #da3633;
background-color: #da363315 !important;
color: var(--b3-theme-on-background);
padding:15px !important;
border-radius: 0;
}
div[custom-cssclasses="callout_caution"] > div:first-child > div:first-child {
color: #da3633;
display:inline-flex;
align-items: center;
}
div[custom-cssclasses="callout_caution"] > div:first-child > div:first-child:before {
content: "";
display: inline-block;
overflow: visible !important;
vertical-align: middle;
width: 22px;
height: 22px;
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjcxNDI4NTcxNDI4NTcxNDIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtb2N0YWdvbi1hbGVydCI+PHBhdGggZD0iTTEyIDE2aC4wMSIvPjxwYXRoIGQ9Ik0xMiA4djQiLz48cGF0aCBkPSJNMTUuMzEyIDJhMiAyIDAgMCAxIDEuNDE0LjU4Nmw0LjY4OCA0LjY4OEEyIDIgMCAwIDEgMjIgOC42ODh2Ni42MjRhMiAyIDAgMCAxLS41ODYgMS40MTRsLTQuNjg4IDQuNjg4YTIgMiAwIDAgMS0xLjQxNC41ODZIOC42ODhhMiAyIDAgMCAxLTEuNDE0LS41ODZsLTQuNjg4LTQuNjg4QTIgMiAwIDAgMSAyIDE1LjMxMlY4LjY4OGEyIDIgMCAwIDEgLjU4Ni0xLjQxNGw0LjY4OC00LjY4OEEyIDIgMCAwIDEgOC42ODggMnoiLz48L3N2Zz4="); /* 设置为mask */
mask-size: cover;
background-color: currentColor;
margin-right: 10px;
mask-repeat: no-repeat;
}
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于