利用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. windows下根据进程ID强制杀死进程

    [windows 进程ID PID]NTSD命令详解 1. ntsd -c q -p PID 2. ntsd -c q -pn ImageName 比如:ntsd -c q -pn qq.exe -c ...

  2. Skyline开发2-第一个程序

    来试试Skyline的Hello World.使用的工具是VS2017+Skyline6.5 加载组件 在工具箱右键新建skyline选项卡,在skyline选项卡上右键选择项,在弹出的"选 ...

  3. Using LACP with a vSphere Distributed Switch 5.1

    Using LACP with a vSphere Distributed Switch 5.1 by Chris Wahl on Oct 15th, 2012 | 6,347 views One o ...

  4. Mysql删除所有表

    SELECT CONCAT('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_s ...

  5. Struts2(九)OGNL标签一与Struts2标签

    一.什么是OGNL  Object Graph Navigation Language对象图导航语言. 是Struts2默认的表达式语言,开源,功能更强大.和EL表达式有点相似 存取对象的属性,调用对 ...

  6. 动态加载jar包(一)

    一.编写被调用的类 package com.qunar.helloworld; public class HelloWorld { public String sayHello(){ return ( ...

  7. ngx_lua实现页面跳转

    好久不用ngx_lua了,忽然被问到如何实现页面跳转,半天没反应过来,查了半天资料搞出来的,在这里做一个备份. 需求说明:***.taobao.com 跳转到 www.taobao.com/?url= ...

  8. Mahout 协同过滤 itemBase RecommenderJob源码分析

    来自:http://blog.csdn.net/heyutao007/article/details/8612906 Mahout支持2种 M/R 的jobs实现itemBase的协同过滤 I.Ite ...

  9. tomcat6url请求400错误(%2F与%5C)

    近期几天,开发接口时.tomcat报了400错误,查了下原因. 错误原因:url中參数部分包括/,默认tomcat是不支持url參数包括: /(%2F),\(%5C). 解析方法:能够通过加入配置Do ...

  10. Customize Web Sessions List

    To customize Fiddler's Web Sessions List, add rules using FiddlerScript to the OnBeforeRequest funct ...