南屏山敲钟人 2016-02-01 16:05 采纳率: 0%
浏览 1565
已结题

css小白提问 问什么div的父样式无法显示?

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="zh-cn" />
        <meta name="robots" content="all" />
        <title>demo</title>

        <!-- CSS Stylesheet -->
        <style type="text/css">
            body{
                background: #FFFFFF;
                font: 12px verdana, simsun,tahoma,geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
                margin: 5px 10px 10px 10px;
                padding: 0px;
            }
            <!--弹出框-->
            .detail{
                background-image:url('1.jpg');
                width: 250px;
                height: 120px;
                border: 1px solid #f0f0f0;
                position: absolute;
                top: 100px;
                left: 100px;
                background: #f0f0f0;
                opacity: .95;
                padding: 5px;
                font-size: 14px;
                -webkit-box-shadow: 4px 4px 5px 0 rgba(50,50,50,.27);
                -moz-box-shadow: 4px 4px 5px 0 rgba(50,50,50,.27);
                box-shadow: 4px 4px 5px 0 rgba(50,50,50,.27);
            }
            .detail .scale1{
                -webkit-transform: scale(.6666666666666667);
                -ms-transform: scale(.6666666666666667);
                -moz-transform: scale(.6666666666666667);
            }
            .detail .point{
                top: 130px;
                width: 0;
                height: 0;
                border-top: 18px solid #f0f0f0;
                border-right: 17px solid transparent;
                margin-top: 0;
                margin-left: -6px;
                float: left;
                position: absolute;
                display:block;
            }
            .pop-text {
                clear: both;
                display: block;
            }
            .room-closed {
                display: block;
                color: #2F2C2C;
            }
        </style>
    </head>

    <body>
        <div align="center">
            <div>
                <img src="psd.jpg" border="0" />
            </div>
            <div class="detail" >
                <div class="scale1" style="left: 282.05px; top: 89.5px; transform-origin: left bottom 0px; display:block;">
                    <span class="pop-text">Room 24</span>
                    <span class="pop-text">Living and Dying</span>
                    <span class="pop-text">The Wellcome Trust Gallery</span>
                    <span class="pop-text">Themes</span>
                    <span class="room-closed"></span>
                    <span class="pop-room-link">
                        <a href="#">More about gallery ›</a>
                    </span>
                    <div class="point">
                    </div>
                </div>
            </div>

        </div>
    </body>
</html>

实在想不通啊 我用火狐的F12控制台的时候点到这个div并不会跳出css样式,可是下面的子div都是正常显示的

  • 写回答

5条回答 默认 最新

  • threenewbee 2016-02-01 23:26
    关注

    不可能啊,检查下有没有把你的css文件包含进来,或者你包含的是另一个文件的

     <link rel="stylesheet" type="text/css" href="xxxx.css" />
    

    然后检查你是不是在别的地方有不同的定义。

    建议你用chrome浏览器的开发者工具,它可以显示每个元素应用的css,以及对应来自什么文件,看起来很方便

    评论

报告相同问题?

悬赏问题

  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办