HTML中如何使背景颜色由深变浅
- 提问者网友:听门外雪花风
- 2021-04-28 13:03
- 五星知识达人网友:爱难随人意
- 2021-04-28 13:17
- 1楼网友:山君与见山
- 2021-04-28 18:09
一个CSS代码就可以了,用得着那么长吗?
<style>
body{background:;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ff0000,endColorStr=#ffffff); overflow:hidden}
</style>
- 2楼网友:低音帝王
- 2021-04-28 16:31
<style> #idDiv{width:80%;height:80px;background-color:#FF6633;color:#FFFFFF;padding:6px;filter : progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=0,finishOpacity=100);} #idCodeDiv{width:100%;padding:4px;font-family:verdana,tahoma;margin:12px 0px 0px 0px;background-color:#EEEEEE;font-weight:bold;} </style> <script> var sFilter="filter : progid:DXImageTransform.Microsoft.Alpha("; var sCodeEnd="startX=0, startY=0, finishX=100, finishY=100,"; function rdl_change(e){ var oCodeDiv=document.all("idCodeDiv"); var oDiv=document.all("idDiv"); with (document.all("idSel1")) var sValue1=parseInt(options[selectedIndex].value); with (document.all("idSel2")) var sValue2=parseInt(options[selectedIndex].value); with (document.all("idSel3")) var sValue3=parseInt(options[selectedIndex].value); oDiv.filters[0].Style=sValue1; oDiv.filters[0].Opacity=sValue2; oDiv.filters[0].FinishOpacity=parseInt(sValue3); if (sValue1!=1) oCodeDiv.innerText=sFilter+",opacity="+sValue2+",finishOpacity="+sValue3+");"; else oCodeDiv.innerText=sFilter+sCodeEnd+",opacity="+sValue2+",finishOpacity="+sValue3+");"; } </script> <div id=idDiv><img src="images/rdl_sex.gif" >请从下方选择滤镜参数的值。</div> <br> <table><tr><td> <select id="idSel1" onchange="rdl_change();"> <option value="0">---渐变样式--- <option value="0">0 <option value="1">1 <option value="2">2 <option value="3" selected>3 </select> </td><td> <select id="idSel2" onchange="rdl_change();"> <option value="0">---开始透明度--- <option value="0" selected>0 <option value="25">25 <option value="50">50 <option value="75">75 <option value="100">100 </select> <select id="idSel3" onchange="rdl_change();"> <option value="0">---结束透明度--- <option value="0">0 <option value="25">25 <option value="50">50 <option value="75">75 <option value="100" selected>100 </select> </td></tr></table> <div id=idCodeDiv>filter : progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=0,finishOpacity=100);</div>
css滤镜
- 3楼网友:拾荒鲤
- 2021-04-28 15:16
- 4楼网友:想偏头吻你
- 2021-04-28 14:37
做一个背景图片就行啦
然后在css里加一个
body{background:url(背景图片的地址)}