首页 > 解决方案 > ×...它在跨度、div 和 p 标签中向我显示正斜杠(浏览器 chrome 和 firefox)

问题描述

/* CSS Document */

@import url('https://fonts.googleapis.com/css?family=Exo+2');
body {
  margin: 0;
  padding: 0;
  font-family: 'Exo 2', sans-serif, arial, helvetica, roboto, callibri, verdana;
  text-align: center;
}

button {
  background-color: #069;
  color: #FFF;
  width: 150px;
  height: 40px;
  border: none;
  margin: 0 auto;
  display: block;
  font-size: 16px;
  cursor: pointer;
}

div#modal {
  background-color: #0004;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  padding-top: 120px;
}

.img_contr {
  border: 1px solid red;
}

.close {
  float: right;
  font-size: 25px;
  font-weight: bold;
  width: 50px;
}

form {
  border: 1px solid #666;
  width: 60%;
  text-align: ;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
}
<h2>Modal Login Form</h2>
<button>Login</button>
<div id="modal">
  <form action="action_page.php">
    <div class="img_contr">
      <img src="https://dummyimage.com/200x200/000/fff" alt="magic">
      <span class="close">&times;</span>
    </div>
    <label for="user_name">Username</label>
    <input type="text" placeholder="Enter Username" />
    <label for="user_pass">Password</label>
    <input type="password" placeholder="Password" />
  </form>
</div>

这是我的代码和实体,它向我显示跨度、div 和 p 标签中的正斜杠(浏览器.. chrome 和 firefox)

标签: htmlcss

解决方案


推荐阅读