利用css如何让嵌套的div层不继承父div层的透明度?

http://blog.csdn.net/foart/article/details/39177653

 
 
 
 

<style media="screen">
.yss{
width:200px;
height:200px;

}
.ys{
width:200px;
height:200px;
/*background-size:200px 200px;*/
/*background:url('/images/logosmall.jpg');*/

background:url('@picstr');
background-position: 50% 50%;
background-repeat:no-repeat;
background-size: 200px 200px;

}
.kss{
width:200px;
height:200px;
/*background:url('/images/logosmall.jpg');*/
/*background-size:200px 200px;*/
background:url('@picstr');
background-position: 50% 50%;
background-repeat:no-repeat;
background-size: 200px 200px;
opacity:0.4;
filter:"alpha(opacity=40)";
-ms-filter:"alpha(opacity=40)"; /* 旧版IE */

}
.edd{
width:200px;
height:200px;
border:0px solid black;
/*position:relative;*/
position:absolute;
margin-top:-200px;
/*margin-left:-200px;*/
}

.svgks{
width:200px;
height:200px;
border:0px solid black;
/*position:relative;*/
position:absolute;
margin-top:-200px;
/*margin-left:-200px;*/

opacity:0;
filter:"alpha(opacity=0)";
-ms-filter:"alpha(opacity=0)"; /* 旧版IE */
}
</style>

@if (cwords != null)
{
<input type="hidden" name="svgid" id="svgid" value="@(cwords.VectorgraphFile)" />@*
<input type="hidden" name="svgreset" id="svgreset" value="0" />

*@<p id="ppp" class="ys" style="">

</p>
<svg id="svg" class="edd"></svg>

<p id="div3" style="display:none;">
@* @(Userhelper.getwotdtrext(cwords.Id, 2))*@
@* test one is two*@
@(Userhelper.getwotdtrext(cwords.Id, 2))
</p>
<p> &nbsp; &nbsp; &nbsp;<input type="button" id="ani" class="btn btn-success btn-sm" value="Play" onclick="ss();"/>
<input type="button" id="svgreset" class="btn btn-success btn-sm" value="reset" onclick="resets();"/>
</p>

利用css如何让嵌套的div层不继承父div层的透明度?的更多相关文章

  1. 子DIV设置margin-top影响父DIV位置的解决办法

    父div如果没有任何东西,子div设置margin-top,父div会下落 <!DOCTYPE html> <html lang="en"> <hea ...

  2. CSS: 解决Div float后,父Div无法高度自适应的问题

    在用CSS+DIV的布局中,常常会发现,当一个DIV float之后,假设他的高度超过了其父DIV的高度时,其父DIV的高度并不会对应的进行调整.要解决问题(也叫做闭合(清除)浮动),我们有四种办法: ...

  3. 子div设置margin-top使得父div也跟着向下移动

    之前在写网页的时候,发现一个小问题,就是子div设置margin-top的时候,父的div也会跟着向下移动.我用代码和图描述一下问题: <span style="font-size:1 ...

  4. 子div撑不开父div的几种解决办法:

    如何修正DIV float之后导致的外部容器不能撑开的问题   在写HTML代码的时候,发现在Firefox等符合W3C标准的浏览器中,如果有一个DIV作为外部容器,内部的DIV如果设置了float样 ...

  5. 子div撑不开父div

    方法一:推荐 设置父div的overflow:hidden; 方法二: 父div结束前增加一个空div style=”clear:both;” .clear { clear:both; } <d ...

  6. JavaScript中,让一个div在固定的父div中任意拖动

    1.css代码 #big { border: 1px solid #FF3300; width: 300px; height: 300px; position: relative; } #small ...

  7. Position a child div relative to parent container in CSS: [设置 子DIV位置 跟 父DIV相关联]

    最近调DIV的位置比较头疼,各种position: relative / absolute google到一篇好文章[http://www.webdevdoor.com/html-css/css-po ...

  8. css 子div自适应父div高度

    <div class="out"> <div class="a"></div> <div class="b& ...

  9. 父div高度和宽度的应用

    这是我自己在仿腾讯首页时遇到的布局问题,在此记录,如果有错,欢迎指正. 首先是对齐问题,可以把父div的高度设置为0,然后调整padding值,这样可以批量调整子div们和其他父div的相对高度. 这 ...

随机推荐

  1. (算法)Game

    题目: Jeff loves playing games, Gluttonous snake( an old game in NOKIA era ) is one of his favourites. ...

  2. Oracle ODP.NET vs Microsoft MSDP

    08年做项目时,用 VS 2005,写据库层还在用 MSDP(System.Data.OracleClient),但是当时由于要操作 XML 和二进制文件,所以又使用了 ODP.NET(Oracle. ...

  3. Android:安装时提示:INSTALL_FAILED_INSUFFICIENT_STORAGE

    在将程序发布到手机上时提示该错误: INSTALL_FAILED_INSUFFICIENT_STORAGE 解决方法: 1. adb shell 2. #df # df df Filesystem   ...

  4. 谷哥的小弟学前端(10)——JavaScript基础知识(1)

    探索Android软键盘的疑难杂症 深入探讨Android异步精髓Handler 具体解释Android主流框架不可或缺的基石 站在源代码的肩膀上全解Scroller工作机制 Android多分辨率适 ...

  5. 剑指offer 高速排序

    高速排序一般的写法.教科书上非常具体,这里介绍作者的写法. 程序例如以下: #include<iostream> #include<stack> using namespace ...

  6. Google Chrome Resize Plugin

    https://chrome.google.com/webstore/detail/window-resizer/kkelicaakdanhinjdeammmilcgefonfh

  7. css背景全屏-视差

    <!DOCTYPE html> <html> <head> <title></title> <style> *{margin:0 ...

  8. 微信小程序 - 自定义弹窗组件

    2019-01-06:简化了一些代码,以及增加了可用性. // 弹窗配置 dialogConfig: { // 弹窗 dialogvisible: false, options: { // 显示关闭按 ...

  9. Fibre Channel address weaknesses

    http://searchitchannel.techtarget.com/feature/Fibre-Channel-address-weaknesses Figure 2.1 Five layer ...

  10. SpringBoot2中配置文件的调整,升级SpringBoot2时候注意的坑

    原来使用SpringBoot1.5最近写个demo后发现原来的配置文件不能用了. 最后上网查询了一下资料,springboot2.0和spring1.x还是存在不少问题的. 1.问题一:Java版本要 ...