html - 联系表格、html、css 中缺少文本

标签 html css

<分区>

我一直在尝试在我的联系表单上显示文本,但没有成功。我哪里错了?

我尝试更改字体,但没有用。

https://jsfiddle.net/1ryby94m/

<!DOCTYPE html>
<html>
       <head>
       <title> Kontakt </title>
       <link rel="stylesheet" href="index.css" type="text/css" />
       </head>
       <body>

       <h1 align="center">
       <a href="index.html"><img src="logo.png" alt="A.Willi A.G" /></a>
       </h1>

       <div class="menu_div">
       <ul>
       <li><a href="index.html">Home</a></li> 
       <li class="dropdown">
       <a href="#" class="dropbtn">Bewerber</a>
       <div class="dropdown-content">
       <a href="#">Info</a>
       <a href="#">Jobs</a>
       </div>
       </li>

       <li class="dropdown"><a href="#" class="dropbtn">Kunde</a>
       <div class="dropdown-content">
       <a href="personalverleih.html">Personalverleih</a>
       <a href="toolrental.html">Werkzeuge Mieten</a>
       <a href="referenzen.html">Referenzen</a>
       <a href="quali.html">Qulität, Sicherheit und Weiterbildung</a>
       </div>
       </li>
       <li><a href="kontakt.html">Kontakt</a></li>
       </ul>
       </div>

       <div class="fadein"> 
       <img src="welder1.png">
       <img src="welder2.png">
       <img src="welder3.png"> 
       </div>
       <div class="fadein img">
       </div>


       <form action="http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi" method="post">
       <div>
       <label for="name">Name:</label>
       <input type="text" id="name" name="user_name">
       </div>

      <div>
      <label for="mail">E-mail:</label>
      <input type="email" id="mail" name="user_email">
      </div>

      <div>
      <label for="msg">Message:</label>
      <textarea id="msg" name="user_message"></textarea>
      </div>

      <div class="button">
      <button type="submit">Send your message</button>
     </div>
</form>

</body>       
</html>
body { font-family: verdana; background:white ; color: white; }

.menu_div{background-color: #333; width:100%;}
ul {
    list-style-type: none;
    margin: 0 auto;
    display:table;
    padding: 0;
    z-index: 100;
    overflow: hidden;
}

li {
    float: left;
}

li a, .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

li a:hover, .dropdown:hover .dropbtn {
    background-color: black;
}

li.dropdown {
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

        @keyframes fade {
        0%   { opacity: 0; }
        11.11%   { opacity: 1; }
        33.33%  { opacity: 1; }
        44.44%  { opacity: 0; }
        100% { opacity: 0; }
}

    .fadein { position:absolute; height:102px; width:50px; outline: 1px solid blue; }
    .fadein img { position:absolute; left:0; right:0; opacity:0; animation-name: fade; animation-duration: 9s; animation-iteration-count: infinite; }
    .fadein img:nth-child(1) { animation-delay: 0s;  }
    .fadein img:nth-child(2) { animation-delay: 3s;  }
    .fadein img:nth-child(3) { animation-delay: 6s;  }

.menu_div { 
  position: relative;
  z-index: 0;
  border: dashed;
  height: 2.9em;
  margin-bottom: 0em;
  margin-top: 0em;
  z-index:1000;


}
.fadein { 
  position: relative;
  z-index: 3; 
  background: ;
  width: 100%;
  left: 1px;
  top: 0em;

  }

.fadein img{
    margin:0 auto;
    width: 100%;
    max-width: 4060px;
    min-width: 900px;
    max-height: 500%;
}




.tech-slideshow {
  height: 200px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.tech-slideshow > div {
  height: 100px;
  width: 2526px;
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/collage.jpg);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: translate3d(0, 0, 0);
}
.tech-slideshow .mover-1 {
  animation: moveSlideshow 12s linear infinite;
}
.tech-slideshow .mover-2 {
  opacity: 0;
  transition: opacity 0.5s ease-out;
  background-position: 0 -200px;
  animation: moveSlideshow 15s linear infinite;
}
.tech-slideshow:hover .mover-2 {
  opacity: 1;
}

@keyframes moveSlideshow {
  100% { 
    transform: translateX(-66.6666%);  
  }
}

form {
  /* Just to center the form on the page */
  margin: 0 auto;
  width: 400px;

  /* To see the limits of the form */
  padding: 1em;
  border: 1px solid #CCC;
  border-radius: 1em;
}

div + div {
  margin-top: 1em;
}

label {
  /* To make sure that all label have the same size and are properly align */
  display: inline-block;
  width: 90px;
  text-align: right;
}

input, textarea {
  /* To make sure that all text field have the same font settings
     By default, textarea are set with a monospace font */
  font: 1em verdana;

  /* To give the same size to all text field */
  width: 300px;

  -moz-box-sizing: border-box;
       box-sizing: border-box;

  /* To harmonize the look & feel of text field border */
  border: 1px solid #999;
}

input:focus, textarea:focus {
  /* To give a little highligh on active elements */
  border-color: #000;
}

textarea {
  /* To properly align multiline text field with their label */
  vertical-align: top;

  /* To give enough room to type some text */
  height: 5em;

  /* To allow users to resize any textarea vertically
     It works only on Chrome, Firefox and Safari */
  resize: vertical;
}

.button {
  /* To position the buttons to the same position of the text fields */
  padding-left: 90px; /* same size as the label elements */
}

button {
  /* This extra magin represent the same space as the space between
     the labels and their text fields */
  margin-left: .5em;
}

最佳答案

您在正文 CSS 中将字体颜色设置为白色。

要么改变它,要么添加:

label {color: black;}

fiddle :https://jsfiddle.net/t39ey3u3/

关于html - 联系表格、html、css 中缺少文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40593319/

相关文章:

javascript - Bootstrap 模式显示和隐藏奇怪的行为

javascript - 更新值时出错

javascript - 如果更改了任何 iframe 内容,我如何在不更改链接中的属性的情况下强制显示在顶部?

javascript - 在动画 CSS3 或 js 方面,哪种语言允许更大的灵活性?

css - 是否有可以重复使用我自己的自定义 CSS 的 Web 应用程序线框图工具?

iphone - HTML 音频播放导致 iPhone 闪烁

css - 在 div 中显示图标的问题,对齐

css - Effect Advanced CSS3,图像自定义边框

css - XML - 将图像放入 .xsl

javascript - 使用 HTML 表单提前输入 - 根据选择自动填充下一个单元格