当前位置:网站首页>页面标题组件
页面标题组件
2022-07-02 17:23:00 【臧小川】
效果图
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-pos… */
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)
}
}
}
效果图
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)
}
}
边栏推荐
- 学生抖音宣传母校被吐槽“招生减章”,网友:哈哈哈哈哈哈
- Hongmeng's fourth learning
- StretchDIBits函数
- R语言ggplot2可视化分面图(facet):gganimate包基于transition_time函数创建动态散点图动画(gif)
- Paddlepaddle 28 build an automatic coder based on convolution
- SQL training 2
- Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
- NM02-独立于总线协议的NM模块调用序列图及代码解释
- 300+篇文献!一文详解基于Transformer的多模态学习最新进展
- 【每日一题】第一天
猜你喜欢
阿里三面被面试官狂问Redis,简历上再也不敢写'精通'了
彻底搞懂基于Open3D的点云处理教程!
How to clean up discarded PVs and their corresponding folders
UE4 用spline畫正圓
How to enable the run dashboard function of idea
Industrial software lecture - core technology analysis of 3D CAD design software - the second lecture of the Forum
徹底搞懂基於Open3D的點雲處理教程!
Leetcode (81) -- search rotation sort array II
UE4 用spline画正圆
Leetcode interview question 17.04 Vanishing numbers
随机推荐
SQL training 2
The official docker image running container in version 1.5.1 can be set to use MySQL 8 driver?
Redis (7) -- database and expiration key
The difference between promise and observable
SAP S/4HANA OData Mock Service 介绍
AI开发调试系列第二弹:多机分布式调测探索之旅
Relax again! These fresh students can settle directly in Shanghai
故障排查:kubectl报错ValidationError: unknown field \u00a0
元宇宙链游系统开发(逻辑开发)丨链游系统开发(详细分析)
Leetcode interview question 16.11 Diving board
@Component 拿不到dao层
Server PHP environment building tutorial, PHP server environment building graphic explanation
哪个券商公司网上开户佣金低又安全又可靠
材质UV遮罩的技巧
距离度量 —— 杰卡德距离(Jaccard Distance)
Meal card hdu2546
Responses of different people in technology companies to bugs | daily anecdotes
The text editor hopes to mark the wrong sentences in red, and the text editor uses markdown
M2dgr: slam data set of multi-source and multi scene ground robot (ICRA 2022)
如何清理废弃pv和其对应的文件夹