当前位置:网站首页>页面标题组件
页面标题组件
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)
}
}
边栏推荐
- Implementation shadow introduction
- Night God simulator +fiddler packet capture test app
- How to write controller layer code gracefully?
- R语言ggplot2可视化分面图(facet):gganimate包基于transition_time函数创建动态散点图动画(gif)
- @Component 拿不到dao层
- What is cloud primordial? This time, I can finally understand!
- 如何设置VSCode删除整行快捷键?
- options should NOT have additional properties
- R语言dplyr包na_if函数把向量数值中的控制转化为缺失值NA、按照映射规则把指定内容转化为缺失值NA
- 科技公司不同人对Bug的反应 | 每日趣闻
猜你喜欢

Night God simulator +fiddler packet capture test app

故障排查:kubectl报错ValidationError: unknown field \u00a0

Esp32-c3 introductory tutorial question ⑩ - error: implicit declaration of function 'ESP_ blufi_ close‘;

Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour

Thoroughly understand the point cloud processing tutorial based on open3d!

A simple PHP personal card issuing program v4.0

材质UV遮罩的技巧

夜神模拟器+Fiddler抓包测试App
![Unity learning shader notes [82] black and white processing of enhanced single channel color rendering](/img/db/d745a434e76511742d1264706b5d9a.png)
Unity learning shader notes [82] black and white processing of enhanced single channel color rendering

阿里三面被面试官狂问Redis,简历上再也不敢写'精通'了
随机推荐
开源物联网平台ThingsBoard的安装
In early summer, Kaiyuan magic changed an electric mosquito racket with killing sound effect!
A simple PHP personal card issuing program v4.0
问题包含哪些环节
链游系统开发(Unity3D链游开发详情)丨链游开发成熟技术源码
Paddlepaddle 28 build an automatic coder based on convolution
promise 和 Observable 的区别
Looking for innocence in New York -- a beautiful day at the discovery center of Legoland, New Jersey
The student Tiktok publicized that his alma mater was roast about "reducing the seal of enrollment". Netizen: hahahahahahahaha
AI开发调试系列第二弹:多机分布式调测探索之旅
Detailed explanation of cjson usage
R语言dplyr包filter函数筛选dataframe数据、如果需要筛选的数据列(变量)名称中包含引号则需要使用!!sym语法处理、否则因为无法处理引号筛选不到任何数据
在Tensorflow2中使用mnist_784数据集进行手写数字识别
消除IBM P750小机上的黄色报警灯[通俗易懂]
Typical application of "stack" - expression evaluation (implemented in C language)
Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
Leetcode (81) -- search rotation sort array II
R语言ggplot2可视化:gganimate包创建动态柱状图动画(gif)、使用transition_states函数在动画中沿给定维度逐步显示柱状图
在支付宝账户上买基金安全吗
How to use PS to extract image color and analyze color matching