我想讓CSS更改彈出,基本上是一個Cookie策略居中的div,然後是「接受」按鈕。我正在使用DNN CMS,彈出窗口是一個模塊,因此無法更改div或類名稱。如何設計一個類型=「按鈕」的輸入?
對於'接受'按鈕,CSS工作正常,但它影響了評論表的輸入。我如何編寫CSS以便CSS隻影響該div中的「接受」按鈕?
順便說一下,'接受'按鈕是一個類型=「按鈕」的輸入。
HTML的 '接受' 按鈕
<input name="CookieConsent_CloseLink" id="View_CookieConsent_sal_CloseLink" value="Accept" type="button">
CSS的 '接受' 按鈕
#View_CookieConsent_sal_CloseLink button, input {
font-family: 'Oswald', arial, sans-serif;
text-transform: uppercase;
font-size: 14px;
padding: 5px;
position: absolute;
left: 40%;
margin-top: 10px;
margin-bottom: 10px;
}
HTML的 '接受' 按鈕
<input name="txtYourName" value="Anonymous" id="txtYourName" class="NormalTextBox" style="width: 100%" type="text">
那邊有其他的按鈕嗎?否則,'input [type = button] {/ * properties * /}'會起作用。如果存在,'input [name = CookieConsent_CloseLink]'更具體。或者如果你知道它不會改變,你可以使用這個ID。 – Jon
您可以通過屬性輸入來定位輸入[type = button] – Huangism
謝謝。 input [type =「button]解決了我的問題。 – user3097331