zoukankan      html  css  js  c++  java
  • CSS cursor 和 opacity 属性

    cursor :一些不同的光标,当设置该属性之后,鼠标指上去会随着属性而改变。

    举例:

    <span style="cursor:crosshair">十字线</span><br>
    <span style="cursor:default">默认的</span><br>
    <span style="cursor:help">帮助</span><br>
    <span style="cursor:move">指示某对象可被移动</span><br>
    <span style="cursor:n-resize">出现左右箭头</span><br>
    <span style="cursor:pointer">一只手</span><br>
    <span style="cursor:progress">正在加载</span><br>
    <span style="cursor:text">文本</span><br>

    opacity:用于设置元素的透明度,元素的不透明度级别描述了透明度级别,当不透明度为 1 时表示完全不透明,当不透明度为 0.5 时表示半透明,当不透明度为 0 时表示完全透明。

    opacity: value|inherit;

    value取值说明:不透明度,从 0.0 (完全透明)到 1.0(完全不透明)。

    inherit取值说明opacity属性的值应该从父元素继承。

    为了兼容IE8 以及更早的版本支持替代的 filter 属性。可以这样设置:filter:Alpha(opacity=50)。

    <div>This element's opacity is 0.5! Note that both the text and the background-color are affected by the opacity level!</div>
    
    /**
     *css设置透明度
     */
    <style> 
    div
    {
        background-color:red;
        opacity:0.5;
        filter:Alpha(opacity=50); 
    }
    </style>
  • 相关阅读:
    struts2 ajax传值
    s:iterator遍历
    JavaScript闭包
    组合继承与寄生组合式继承
    JSP EL表达式详细介绍
    js判断字符串是否包含中文或英文
    jQuery 中 jQuery(function(){})与(function(){})(jQuery) 的区别
    HTML5--新增结构元素(2)
    HTML5--新增全局属性(1)
    nodejs的安装配置(nvm-windows)
  • 原文地址:https://www.cnblogs.com/zhangqie/p/6737116.html
Copyright © 2011-2022 走看看