css属性不申请div

标签 css

在下面的代码中,在 div 部分成功和失败类中,字体颜色没有改变,div 语句有下划线。 text-align 和 font-size 是否正确应用css成功与否,请检查

  <html>
  <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">            </script>  
  <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.1.min.js"></script>  
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

 <style>

 td
 {
   height:40px;
 }
     select
     {
       spacing-left:50px;
     }
     .well-width
     {   
       height:400px;     
       border-radius:10px;     
       width:600px;        
      -webkit-box-shadow:0 0 20px grey;  
     }
     #title
     {
   font-weight:bold;
   font-size:38px;
   color:#f22144;
   font-family: 'Slabo 24px', serif;
     }
    #subtitle
    {
      color:green;
      font-size:25px;
      margin-left:80px;
      font-weight:bold;   
    }
    .success
    {
      text-align:center;
      font-size:25px;
      text-colour:green;
    }
    .fail
    {
      text-align:center;
      font-size:25px;
      colour: white;
      text-decoration: none;
      text-decoration-color: red;         
    }
       </style> 
     </head>
   <body>

     <div class="container">

       <br>
        <div class="well-width">    
         <br><Center><h1 style="color:green;font-family:'Arial Black';">       <u>GET RECEIPT<u></h1></center></br>
      <form method="post" action="#" autocomplete="off">   
        <center><table border=0>
         <tr>
             <td><label> Enter the Reference Number:</label></td>
             <td> <input type="text" name="ref" maxlength="10" required>  </td>
        </tr>
        <tr>
             <td><label> Enter Roll Number:</label></td>
             <td> <input type="text" name="roll" maxlength="10" required></td>
        </tr>

        <tr>
            <td colspan=2><center><input type="submit" name="submit" class="btn btn-info" value="Delete"></center></td>
        <tr>

         </table></center>
      </form>   
     </div>     
   </div>  
  <?php
if(isset($_POST['submit']))
{
  include('connect.php');
  $ref=$_POST['ref'];
  $roll=$_POST['roll'];

  $sql="select * from registrations where id='$ref' and rollno='$roll'";
  $query=mysql_query($sql);
  $count=mysql_num_rows($query);
  if($count>0)
  {
   $sql1="delete from registrations where id='$ref' and rollno='$roll'" ;
   $query1=mysql_query($sql1);
    if($query1)
    {
      echo"<div class='success'>$count records deleted successfully</div>";
    }       
  }
  else
  {
    echo"<div class='fail'>No records found with this Refrence Id and Rollno</div>";

  }
}
  ?>
 </body>
</html>

最佳答案

首先你的代码质量很差。看。请使用工具解决您的问题。

enter image description here

关于css属性不申请div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45229088/

相关文章:

php - 图像不水平显示

javascript - 从 Coder Projects 制作音乐盒元素,盒子似乎没有注册 mousedown

css - 如何使用 background-position 制作响应式图片

javascript - 使位置绝对可滚动的div

css - Bootstrap 4 中的图标居中

javascript - 调整 HTA 大小时如何固定页面位置

html - 为什么我的转换会弹回?

javascript - HTML/CSS - 在我的导航中的事件选项卡底部添加一个小三 Angular 形或箭头

javascript - 最后单击的图像周围的边框

javascript - 当内联 block div 高度增长时防止内容流动