利用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. C# WPF 滚动字幕实现

    <Window x:Class="Micro.Crawler.MainWindow" xmlns="http://schemas.microsoft.com/win ...

  2. 两种解决IE6不支持固定定位的方法

    有两种让IE6支持position:fixed1.用CSS执行表达式 *{margin:0;padding:0;} * html,* html body{ background-image:url(a ...

  3. 一次性解决Intellij IDEA maven 自动跳到1.5的JDK

    说明:文章学习自:https://blog.csdn.net/Zereao/article/details/77427989 一.找到Setting.xml文件 打开setting.xml 说明,该文 ...

  4. JERSEY中文翻译(第三章、模块和依赖)

    Chapter 2 Modules and Dependencencies 2.1 Java SE 兼容 所有的Jersey组建都是基于Java6开发的,所以你的Java必须是Java6以上的版本才能 ...

  5. 转:nginx模块开发——handler(二)

    模块上下文结构 这是一个ngx_http_module_t类型的静态变量.这个变量实际上是提供一组回调函数指针,这些函数有在创建存储配置信息的对象的函数,也有在创建前和创建后会调用的函数.这些函数都将 ...

  6. time series review

    https://pdfs.semanticscholar.org/fc9c/1a94a15dd44c8c61b3e4841ecb9505f8cd37.pdf https://edoc.hu-berli ...

  7. SpringBoot之actuator

    在springBoot中集成actuator可以很方便的管理和监控应用的状态. 暴露的Restful接口有: HTTP方法 路径 描述 鉴权 GET /autoconfig 查看自动配置的使用情况 t ...

  8. android自动化测试--appium运行的坑问题及解决方法

    问题 1. error: Failed to start an Appium session, err was: Error: Requested a new session but one was ...

  9. redhat7.0安装ifconfig

    问题描述: Setup is unable to find the "ifconfig" program on your machine. Please make sure it ...

  10. redis对key的基本操作

    不忘初心,励志前行 del key1 key2 ... Keyn作用: 删除1个或多个键返回值: 不存在的key忽略掉,返回真正删除的key的数量 rename key newkey作用: 给key赋 ...