當在 wordpress 中單擊或激活時,css 或 JavaScript 有沒有辦法設定影片邊框?
我想在 ul 串列上實作這種效果。我正在使用過濾器產品,但我無法在 li 元素中放置按鈕。
.btn{
border:none;
color: #FFFFFF29;
position: relative;
display: inline-block;
overflow: hidden;
padding: 0.5rem 0;
font-size:65px;
transition: .3s;
transition-delay: 0.5s;
}
.btn::before{
content: "";
position: absolute;
left: 0;
bottom: 0;
height: 1px;
width: 100%;
background-color: #fff;
transform: translateX(-105%);
transition: transform 0.5s ease-in-out;
transition-delay: 0.5s;
}
.btn:focus::before{
transform: translateX(0);
}
.btn:focus{
transition:.3s;
color:#fff;
transition-delay: 0.5s;
outline: none;
background-color: transparent;
}
.btn:not(hover){
color: #FFFFFF29 ;
background-color: #1a1a1a;
}
ul {
background-color:#1a1a1a;
list-style-type: none;
}
<ul>
<li><button class="btn" >Digital Marketing</button></li>
<li><button class="btn" >Sviluppo</button></li>
</ul>
uj5u.com熱心網友回復:
元素類添加到標簽中
uj5u.com熱心網友回復:
.btn:not(hover){
color: var(--e-global-color-secondary) !important;
background-color: #1a1a1a;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/364396.html
標籤:css WordPress的 内容管理系统 html 列表 元素
