gpt4 book ai didi

html - 如何在 html/css 中包含透明度?

转载 作者:太空宇宙 更新时间:2023-11-03 20:23:19 25 4
gpt4 key购买 nike

我现在需要我的搜索栏和按钮稍微透明一点……有点像当鼠标没有悬停在上面时的推特。我如何在 html/css 中执行此操作?CSS:

.search1{
position: absolute;
font-family:"Arial Unicode MS";
background-color:#CCCCCC;
border-style:none
}

.search2{
position: absolute;
border-style:none;
font-family:"Arial Unicode MS";
color:black;
background-color:#CCCCCC;
font-size:xx-large
}

input:hover{
background-color:white;
border-color:white;
}

HTML:

<form class="search2" method="get" action="default.html" />
<input class="search2" type="text" name="serach_bar" size="31" maxlength="255"
value="" style="left: 396px; top: 149px; width: 300px; height: 50px;" />
<input class="search1" type="submit" name="submition" value="Search" style=" padding- bottom:20px; left: 710px; top: 157px; height: 17px" />
<input class="search2" type="hidden" name="sitesearch" value="default.html" />

提前谢谢大家!

最佳答案

CSS 3 介绍 colour values with alpha channels ,但您需要混合图像以实现向后兼容性。 http://dorward.me.uk/www/css/alpha-colour/有指南。

如果你也想要前景,那么使用opacity相反(它需要破解某些版本的 IE)。

关于html - 如何在 html/css 中包含透明度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5199937/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com