js怎么实现,表格背景半透明

JavaScript08

js怎么实现,表格背景半透明,第1张

你想将此表格直接成为PNG格式的透明背景图片,

可在PS中不打开背景图片,直接将之前输出的“PDF”文件拖到PS中;

然后将其直接保存为PNG格式即可

保存成功后,就成为了一张PNG透明背景的图片,想要半透明 自己可以调一下

亲 如果要什么不明白 想要具体操作图片流程 你可以追问我

像下面这样:

<html xmlns="http://www.w3.org/1999/xhtml">

<html>

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">

<title></title>

<style type="text/css">

#testWrap{

width:600px

height:30px

background-color:red

}

.title{

float:left

margin-top:10px

padding:0 10px

height:20px

line-height:20px

font-size:13px

color:white

}

.select{

background-color: transparent

border: solid 0px

-webkit-appearance: initial

}

</style>

<script type="text/javascript">

</script>

</head>

<body>

<div id="testWrap">

<select class="select">

<option>test</option>

<option>test2</option>

</select>

</div>

</body>

</html>

ie下面高版本的渐变又透明的才行。没法透明,可以考虑使用透明png。

rgba最后面的那个1可以改为0.8试试看,就变成透明的了。。

#box{width:200pxheight:200pxoverflow:hiddenposition: relative}

#box span{

display: blockwidth:100%height:100%position: absolutetop:0left:0

background-image:linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)

background-image:-o-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)

background-image:-moz-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)

background-image:-webkit-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)

background-image:-ms-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000,endColorstr=#ffffff,grandientType=1)

}

<div id="box">

<img src="https://ss3.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/news/q=100/sign=2c88d7ac67d0f703e0b291dc38fb5148/3bf33a87e950352a60c7a4b35643fbf2b3118be3.jpg">

<span></span>

</div>