屏幕上没有显示文字

时间:2017-08-16 18:15:27

标签: android html css text

我正在为带有html的手机制作应用程序,我只希望滚动中心。所以,为了测试它,我把hello这个词放在那里。现在我无法找到我插入的文字。

(请不要指出我所有的其他错误,我知道那些错误,我之后会这样做)

(另外,由于我使用px作为衡量标准,它在计算机上看起来很糟糕。我建议使用像Dcoder这样的移动编译器。

CSS

    body {
    background-color: #000000;
}
.head {
    background-color: #555555;
    margin: 0px;
    width: 102.3%;
    height: 60px;
    align: center;
    left: -8px;
    top: -9px;
    position: fixed;
}
.main_user_name {
    color: #9e9e9e;
    position: fixed;
    top: -26px;
    left: 55px;
    font-size: 23px;
}
.lower_auto_name {
    color: #ffffff;     
    position: fixed;
    left: 55px;
}
.back {
    margin: 15px;
    height: 30px;
    float: left;
    top: 7px;
    position: fixed;
}
.user_settings {
    color: ffffff;
    position: absolute;
    top: 2px;
    right: -160px;
    font-size: 10px;
    border: none;
}
.foot {
    background-color: #555555;
    margin: 0px;
    width: 415px;
    height: 50px;
    align: center;
    left: -55px;
    top: 508px;
    position: fixed;
}
.enter_message {
    color: #777777;
    margin: 0px;
    top: 452px;
    left: -30px;
    position: relative;
    z-index: 1;
}
.modal1 {
    height: 60px;
    font-size: 20px;
   display: none;
   z-index: 1;
   background-color: #555555;
   left: 0px;
   top: 380px;
   color: #ff0707;
   position: fixed;
   width: 100%;
   text-align: center;
   padding: 0px;
}
.modal2 {
   height: 60px;
   font-size: 20px;
   display: none;
   z-index: 1;
   background-color: #555555;
   left: 0px;
   top: 440px;
   color: #ff0707;
   position: fixed;
   width: 100%;
   text-align: center;
   padding: 0px;
}
.modal3 {
    height: 60px;
    font-size: 20px;
   display: none;
   z-index: 1;
   background-color: #555555;
   left: 0px;
   top: 499px;
   color: #ffffff;
   position: fixed;
   width: 100%;
   text-align: center;
   padding: 0px;
}
.everything {
    top: 60px;
    left: 5px;
    z-index: 1;
}

HTML

    <div class="head"><a href="main_screen.html">
<img src="/storage/emulated/0/pictures/eraser/back.png" class="back">
</div></a>
<div class="main_user_name">
<h3><b>Mom</b></h3>
</div>
<div class="lower_auto_name">
<h5>#113A675_76G</h5
</div>
<div class="foot">
</div>
<div class="enter_message">
<h3>Enter Message</h3>
</div>
<div class="user_settings"
<button onclick="document.getElementById('id01').style.display='block';document.getElementById('id02').style.display='block';document.getElementById('id03').style.display='block'">●<br>●<br>●</button>
</div>
<div id="id01" class="modal1">
Block User
</div>
<div id="id02" class="modal2">
Delete All Messages
</div>
<div id="id03" class="modal3" onclick="document.getElementById('id01').style.display='none';document.getElementById('id02').style.display='none';document.getElementById('id03').style.display='none'"">
Cancel    
</div>
</div>
<div class="everything">
<p>
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
hellohellohellohellohellohellohello
</p>
</div>

1 个答案:

答案 0 :(得分:0)

使用下面的CSS,你应该可以看到你好的红色,你还有其他问题,但正如你所说,你将修复它们。

.everything {
   color:red;
    top: 60px;
    left: 5px;
    z-index: 1;
}