CSS透明度的代码:
opacity:0.5
filter:alpha(opacity=50)
background:#000
这个的意思就是在黑色的基础上,透明度是百分五十。
根据你需要的颜色自己选择色值就行了。
1、首先,打开HTML编辑器并创建一个新的HTML文件,比如index.html。
2、在index.html中的<style>标签中,输入css代码:button {background-color: #00a7d0}
button:hover {background-color: #ff7701}。
3、当浏览器运行索引index.html页面中,出现蓝色背景颜色的按钮。
4、将鼠标移到按钮上,按钮的背景颜色将变为橙色。