部分属性位置
- 文章标题下划线动画位置: inc\decorate.php
自定义代码
.author-profile .profile img {
width: 30px;
height: 30px;
}
.entry-content p a {
padding-bottom: 5px; /* 为下划线预留空间 */
color: #00bfff; /* 默认链接颜色为天蓝色 */
position: relative; /* 为伪元素创建定位基准 */
display: inline;
cursor: pointer; /* 鼠标悬停时显示帮助指针 */
}
.entry-content p a:hover {
text-decoration: none;
color: #007fff; /* 鼠标悬停时链接文字变为蓝色 */
}
.entry-content p a::after {
/* 这里插入你提供的CSS代码 */
content: "";
position: absolute;
width: 100%;
transform: scaleX(0);
height: 2px;
bottom: 0;
left: 0;
background-color: #007fff;
transform-origin: bottom right;
transition: transform 0.25s ease-out;
}
.entry-content p a:hover::after {
transform: scaleX(1); /* hover时展开 */
transform-origin: bottom left; /* 改变起点实现方向变化 */
}
/* 表格详细信息居中 */
.wp-block-details summary {
display: flex;
justify-content: center;
font-size: 20px
}
body .is-layout-flex {
justify-content: center;
}
.wp-container-core-group-is-layout-1 {
align-items: center !important;
}
/* 文章标题段落添加外左边距 */
.single-header .entry-census.has-splitter {
margin-left: 5px;
}
主题内部代码
/* 标题横线动画 */
@media (min-width:860px) {
.single-center .single-header h1.entry-title::after {
content: '';
position: absolute;
top: 55%;
left: 2%;
border-radius: 10px;
display: inline-block;
width: 100%;
height: 10px;
z-index: 1;
background-color: var(--article-theme-highlight,var(--theme-skin-matching));
animation: lineWidth 2s s forwards;
opacity: 0;
}
}
Comments NOTHING