首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么我不能看到这个

为什么我不能看到这个
EN

Stack Overflow用户
提问于 2016-10-11 17:48:18
回答 2查看 106关注 0票数 0

我有一个div,它有以下标记:

代码语言:javascript
运行
复制
<div role="gridcell" title="707676" style="width: 84px;" class="grid-cell">707676</div>

如果我在Edge或Firefox的检查器中选择它,我可以看到它在哪里,但我看不到它的内容。你能告诉我为什么吗?下面是CSS:

代码语言:javascript
运行
复制
border-bottom-color: rgb(34, 34, 34);
border-bottom-style: none;
border-bottom-width: 0px;
border-image-outset: 0 0 0 0;
border-image-repeat: stretch stretch;
border-image-slice: 100% 100% 100% 100%;
border-image-source: none;
border-image-width: 1 1 1 1;
border-left-color: rgb(34, 34, 34);
border-left-style: none;
border-left-width: 0px;
border-right-color: rgb(34, 34, 34);
border-right-style: none;
border-right-width: 0px;
border-top-color: rgb(34, 34, 34);
border-top-style: none;
border-top-width: 0px;
box-sizing: border-box;
color: rgb(34, 34, 34);
cursor: default;
display: block;
floatleftfont-family: "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Ubuntu,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 13px;
height: 30px;
line-height: 17px;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
padding-bottom: 7px;
padding-left: 4px;
padding-right: 4px;
padding-top: 6px;
position: relative;
text-alignlefttext-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
width: 84px;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
-moz-user-focus: ignore;

我拿出了真正的页面,并将其简化为以下内容。它与原始标记有些不同,特别是在css的应用方式上,但它似乎再现了问题。有人能告诉我为什么我在我的页面上看不到707676吗?我正在查看下面的例子,如果Firefox。实际页面在Edge和Firefox中显示相同的行为。

代码语言:javascript
运行
复制
<html>

<head>
    <title>Test of element that's not visible</title>
    <style>
        div {
            border-bottom-color: rgb(34, 34, 34);
            border-bottom-style: none;
            border-bottom-width: 0px;
            border-image-outset: 0 0 0 0;
            border-image-repeat: stretch stretch;
            border-image-slice: 100% 100% 100% 100%;
            border-image-source: none;
            border-image-width: 1 1 1 1;
            border-left-color: rgb(34, 34, 34);
            border-left-style: none;
            border-left-width: 0px;
            border-right-color: rgb(34, 34, 34);
            border-right-style: none;
            border-right-width: 0px;
            border-top-color: rgb(34, 34, 34);
            border-top-style: none;
            border-top-width: 0px;
            box-sizing: border-box;
            color: rgb(34, 34, 34);
            cursor: default;
            display: block;
            float: left;
            font-family: "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Ubuntu, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            font-size: 13px;
            height: 30px;
            line-height: 17px;
            overflow: hidden;
            overflow-x: hidden;
            overflow-y: hidden;
            padding-bottom: 7px;
            padding-left: 4px;
            padding-right: 4px;
            padding-top: 6px;
            position: relative;
            horizonal-align: left;
            text-align:left;
            text-overflow: ellipsis;
            vertical-align: middle;
            white-space: nowrap;
            width: 84px;
            -moz-border-bottom-colors: none;
            -moz-border-left-colors: none;
            -moz-border-right-colors: none;
            -moz-border-top-colors: none;
            -moz-user-focus: ignore;
        }
    </style>
</head>

<body>
    <div aria-activedescendant="row_60_8" role="grid" tabindex="0" class="grid-canvas ui-draggable">
        <div style="top: 256px; left: 20px; height: 32px; width: 1867px; -moz-user-focus: ignore;" role="row" id="row_60_8">
            <div role="gridcell" title="707676" style="width: 84px;" class="grid-cell">707676</div>
        </div>
    </div>
</body>

</html>
EN

Stack Overflow用户

发布于 2016-10-11 17:51:26

你把两条线合二为一了。

代码语言:javascript
运行
复制
floatleftfont-family: "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Ubuntu,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";

应:

代码语言:javascript
运行
复制
float: left;
font-family: "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Ubuntu,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
票数 5
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39983477

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档