我在按鈕上正常使用了懸停,然后當我在CSS中為按鈕使用display flex時,懸停選項停止作業。
當我加載html頁面時,在CSS中編輯按鈕的第一部分可以作業,但有#register-btn button:hover的部分卻不能作業。
我是一個初學者,我試著搜索了幾個網站,但我沒有找到任何與我發生的情況類似的東西。
#box {
width: 90%;
height: 800px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#box h1 {
color: white;
字體大小: 3em;
font-family: Arial。
height: 11vh;
}
#box #register-btn {
height: 45vh;
}
div:nth-of-type(2) {
margin-left: 105px;
align-self: flex-start;
}
#register-btn button {
background: none;
color: coral;
border: 2.5px solid;
padding: 1em 2em;
字體大小: 1.1em;
font-weight: bolder;
transition: color 2s, border-color 2s, box-shadow 2s, transformation 2s;
}
#register-btn button:hover{
border-color: #49c04fcc;
color: white;
box-shadow: 0 0.5em 0.5em -0.4em #49c04fcc;
transform。translateY(-1.5em)。
cursor: 指標。
}
<section id="box"> /span>
<div>/span>
<h1>將你的教育<br>提升到新水平! </h1>進入下一階段!
</div>/span>
<div id=register-btn> <br><button>在此注冊! </button></div>
</section>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" class="snippet-box-edit snippet-box-result" frameborder="0"></iframe>
請提供幫助?
任何幫助?
uj5u.com熱心網友回復:
這個作業很好,我沒有看到任何問題。 也許你在其他代碼上有沖突,使它不能作業。 你需要提供更多關于你的錯誤的資訊
。在這里查看這個。
https://codepen.io/mrroshan/pen/JjJOBBP
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/306710.html
標籤:
