效果图
JS
import styles from './style.less'
const index = () =>
{
return (
<div className={styles.markdown}>
<h1 className={styles.heading_h1}>
我唤醒大海 环形山脉
</h1>
<h3 className={styles.heading_h3}>
我唤醒大海 环形山脉
</h3>
</div>
);
};
export default index
CSS
.markdown {
word-break: break-word;
line-height: 1.75;
font-weight: 400;
font-size: 15px;
overflow-x: hidden;
color: #2b2b2b;
font-family: -apple-system, system-ui, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-image: linear-gradient(90deg, rgba(159, 219, 252, .15) 3%, transparent 0), linear-gradient(1turn, rgba(159, 219, 252, .15) 3%, transparent 0);
background-size: 20px 20px;
background-position: 50%;
h1,
h2,
h3,
h4,
h5,
h6 {
padding: 30px 0;
margin-top: 35px;
margin-bottom: 10px;
color: #4dd0e1
}
// ! H1 标题
.heading_h1 {
font-size: 30px;
text-align: center;
position: relative;
width: max-content;
margin: 0 auto
}
.heading_h1:before {
position: absolute;
content: "";
z-index: -1;
top: -20px;
height: 100%;
width: 100px;
left: 0;
right: 0;
margin: 0 auto;
background: url('https://www.dataojocloud.com/dataeye/v1/data/image/get?imageid=617a5596fd73380b818dc300') no-repeat 50%;
background-size: 64px 64px;
opacity: .84
}
.heading_h1:after {
position: absolute;
content: "";
width: 150%;
left: -25%;
height: 50%;
bottom: 12px;
border-radius: 50%;
background: linear-gradient(transparent 80%, rgba(77, 208, 225, .8));
background-size: 400% 200%;
opacity: .6;
animation: h1Animate 6s linear infinite
}
@keyframes h1Animate {
0% {
background-position: 100% 100%
}
50% {
background-position: 100% 50%
}
to {
background-position: 100% 100%
}
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
padding: 30px 0;
margin-top: 35px;
margin-bottom: 10px;
color: #4dd0e1;
}
// ! H3D 标题
.heading_h3 {
margin: 30px 0;
font-size: 18px;
position: relative;
padding: 4px 32px;
width: max-content;
}
.heading_h3::before {
border-bottom: 2px solid #4dd0e1;
width: 100%;
content: "";
display: block;
height: 28px;
position: absolute;
left: 0;
top: 0;
bottom: -2px;
margin: auto;
background-size: 28px 28px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
background-repeat: no-repeat;
animation: h3AnimationBefore 2s infinite alternate;
}
.heading_h3::after {
content: "";
display: block;
width: 28px;
height: 28px;
position: absolute;
border: 2px solid #4dd0e1;
border-radius: 50%;
right: -15px;
top: 0;
bottom: 0;
margin: auto;
background-size: 28px 28px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
animation: h3AnimationAfter 2s infinite alternate;
}
@keyframes h3AnimationBefore {
0% {
width: 28px
}
25% {
width: 100%
}
50% {
width: 100%
}
to {
width: 100%
}
}
@keyframes h3AnimationAfter {
0% {
transform: rotate(0)
}
10% {
transform: rotate(0)
}
50% {
transform: rotate(-1turn)
}
to {
transform: rotate(-1turn)
}
}
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
效果图
Main
import Caption from './Caption'
const index = () =>
{
return (
<Caption>我唤醒大海 环形山脉</Caption>
);
};
export default index
JS
import styles from './style.less'
const index = ({ children }) =>
{
return (
<h3 className={styles.heading_h3}>
{children}
</h3>
);
};
export default index
CSS
.heading_h3 {
// margin: 30px 0;
font-size: 18px;
position: relative;
padding: 4px 32px;
width: max-content;
color: #4dd0e1
}
.heading_h3::before {
border-bottom: 2px solid #4dd0e1;
width: 100%;
content: "";
display: block;
height: 28px;
position: absolute;
left: 0;
top: 0;
bottom: -2px;
margin: auto;
background-size: 28px 28px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
background-repeat: no-repeat;
animation: h3AnimationBefore 2s infinite alternate;
}
.heading_h3::after {
content: "";
display: block;
width: 28px;
height: 28px;
position: absolute;
border: 2px solid #4dd0e1;
border-radius: 50%;
right: -15px;
top: 0;
bottom: 0;
margin: auto;
background-size: 28px 28px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABRklEQVRYR2NkGGDAOMD2M4w6YDQERkNg+ITAppcfY/8zMv3wF+NdTUrZQpUQ2PT6cz8Dw/8CkMWMDIwNvqK8jcQ6gmIHNN19EaXPx1XPyMCghrCUKcpPlGc5MY6gyAE+Fx52MjL8j3cU5a1UYWXtZGBkEAVb+p8hxU+Mby5NHQCxnKEMaskzJ37uFmUetkmMjAzrfUX4woixHBJlZAA0y2EmPPYU4enLkhGeQIqRJDsAh+UgO7duNpD3IcVykkOA2paT5ABaWE60A2hlOdEO8D3/4CMDIyMfWvySFefoaYSoROh74eFXBgYGLiTNVLGc+BC48PAnAwMDG9QBVLOcaAd8P5ox+x/jf5AjGLgYfnwnKqv9/8/PwPO/kFF/MSj0cAKiouD/0bgYoixFU8RovWgJIX1EOYCQIZTIjzpgNARGQ2DAQwAAvHBaIdB7zxsAAAAASUVORK5CYII=);
animation: h3AnimationAfter 2s infinite alternate;
}
@keyframes h3AnimationBefore {
0% {
width: 28px
}
25% {
width: 100%
}
50% {
width: 100%
}
to {
width: 100%
}
}
@keyframes h3AnimationAfter {
0% {
transform: rotate(0)
}
10% {
transform: rotate(0)
}
50% {
transform: rotate(-1turn)
}
to {
transform: rotate(-1turn)
}
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78