GVKun编程网logo

CSS变换元素是否具有默认的z-index?(css中改变元素字体的属性是)

11

针对CSS变换元素是否具有默认的z-index?和css中改变元素字体的属性是这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展.net–如何确定SQLServer存储过程参数是否具有默认值?

针对CSS变换元素是否具有默认的z-index?css中改变元素字体的属性是这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展.net – 如何确定SQL Server存储过程参数是否具有默认值?、Codeception:检查元素是否具有焦点?、css – 元素的z-index对z-index的影响:before /:after伪元素、css – 具有较高z-index的元素仍位于具有较低z-indices的元素下方等相关知识,希望可以帮助到你。

本文目录一览:

CSS变换元素是否具有默认的z-index?(css中改变元素字体的属性是)

CSS变换元素是否具有默认的z-index?(css中改变元素字体的属性是)

我有一个很基本的例子,我有一个固定的标题与其他元素相互堆叠,单个元素是转换使用transform:rotate(360deg).

因此,只有当页面滚动时,已转换的元素才能越过固定栏,其他元素则不会.那么问题是转化元素是否具有默认的z-index?

When you use z-index: -1; for .transform_me it behaves normal

Demo

CSS

.fixed {
    height: 30px;
    background: #f00;
    position: fixed;
    width: 100%;
    top: 0;
}

.transform_me {
    transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
}

span {
    display: block;
    height: 100px;
}

Note: It will be solved if we use say z-index: 999; for the fixed
div,but that’s not what am looking for.

解决方法

For elements whose layout is governed by the CSS Box model,any value other than none for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.

从specification.

Stacking context.

.net – 如何确定SQL Server存储过程参数是否具有默认值?

.net – 如何确定SQL Server存储过程参数是否具有默认值?

有没有办法以编程方式确定sql Server存储过程参数是否具有默认值? (如果您可以确定默认值是什么,则可以获得奖励.) SqlCommandBuilder.DeriveParameters()甚至没有尝试.

在此先感谢您的帮助!

编辑:老实说,我不在乎它是一个SQL查询,一个SMO对象,等等.

解决方法

我发现了一种使用SMO的方法:
Server srv; 
srv = new Server("ServerName"); 

Database db; 
db = srv.Databases["MyDatabase"]; 

var Params = db.StoredProcedures["MyStoredProc"].Parameters;

foreach(StoredProcedureParameter param in Params) {
    Console.WriteLine(param.Name + "-" + param.DefaultValue);
}

Codeception:检查元素是否具有焦点?

Codeception:检查元素是否具有焦点?

有没有办法断言某个元素(例如输入或链接)具有键盘焦点?我在Selenium中使用Codeception。在http://codeception.com/docs/modules/WebDriver上找不到任何内容

答案1

小编典典

一个可靠的消息来源告诉我这可行:

$I->executeJS(''return $("#element").is(":focus")'');

测试愉快!

css – 元素的z-index对z-index的影响:before /:after伪元素

css – 元素的z-index对z-index的影响:before /:after伪元素

这是一个我不太了解的关于z-index和css伪元素:: before / :: after的行为.

它在这个jsfiddle:http://jsfiddle.net/jgoyon/T6QCf/上有说明

我创建了一个定位框并使用:: after伪元素添加内容(也定位).

>如果我将一个z-index设置为:: after伪元素,一切都运行良好我可以通过播放z-index将其放在父节点之上或之下

#no-z-index {
      background:lightblue;
      width:100px;
      height:100px;
      position:relative;
    }
    #no-z-index:after {
      content: 'z-index -1';
      width:50px;
      height:50px;
      background:yellow;
      position:absolute;
      z-index:-1; /* z-index in question */
      top:70px;
      left:70px;
    }

>如果我这样做并设置父级的z-index,它就不再起作用了.

#z-index {
      background:lightblue;
      left:200px;
      width:100px;
      height:100px;
      position:relative;
      z-index:0; /* parent z-index */
    }
    #z-index:after {
      content: 'z-index -1';
      width:50px;
      height:50px;
      background:yellow;
      position:absolute;
      z-index:-1; /* z-index in question */
      top:70px;
      left:70px;
    }

这是预期的行为吗?

解决方法

这是预期的行为,记录在 spec中.

如果未在生成元素上指定z-index(默认为auto),则生成元素和伪元素将出现在同一堆叠上下文中.这允许伪元素在其z-index较低时出现在元素下方.

当你在生成元素上指定z-index时,该元素为伪元素(实际上是它的所有后代)创建一个新的堆叠上下文,防止伪元素出现在它下面,即使你给它一个负z指数.

css – 具有较高z-index的元素仍位于具有较低z-indices的元素下方

css – 具有较高z-index的元素仍位于具有较低z-indices的元素下方

我有一个名为Maxi Menu的Joomla菜单模块的愚蠢问题.这是一个截图:

Link to website

问题似乎是由于z-index引起的.我已经使用过firebug进行了检查,但是还没有找到下方菜单如何找到最佳显示方式.

有趣的是,在菜单项悬停后,其z-index更改为比页面上任何其他菜单项高15000.

如何继续使用12000和类似z-indices的其他菜单项?

Z-indices的Firbug显示:

解决方法

添加位置:相对于具有z-index 10和20的两个div.

Z-indexing是相对于具有非静态位置的第一个父项(绝对,相对,固定)计算的.

关于CSS变换元素是否具有默认的z-index?css中改变元素字体的属性是的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于.net – 如何确定SQL Server存储过程参数是否具有默认值?、Codeception:检查元素是否具有焦点?、css – 元素的z-index对z-index的影响:before /:after伪元素、css – 具有较高z-index的元素仍位于具有较低z-indices的元素下方等相关内容,可以在本站寻找。

本文标签: