CSS中设立的部分参数link后无法读取使用
Jun 13, 2016 pm 12:09 PM
CSS中设置的部分参数link后无法读取使用
我用link方式连接CSS文件后,table主体参数好像没有起作用,但是th td的参数起作用了,为什么啊,比如
border-collapse这个参数,在CSS里面已经设置好了,但是无效,我就把它单独摘出来放到PHP网页里面,这下倒是起作用了,谁知道为什么啊~··谢谢
CSS代码
<style type="text/css"><br />table.gridtable {<br /> font-family: verdana,arial,sans-serif;<br /> font-size:11px;<br /> color:#333333;<br /> border-width: 1px;<br /> border-color: #666666;<br /> border-collapse: collapse;<br />}<br />table.gridtable th {<br /> border-width: 1px;<br /> padding: 8px;<br /> border-style: solid;<br /> border-color: #666666;<br /> background-color: #dedede;<br /><br />}<br />table.gridtable td {<br /> border-width: 1px;<br /> padding: 8px;<br /> border-style: solid;<br /> border-color: #666666;<br /> background-color: #ffffff;<br />}<br /><br /></style><br />
============================
php代码
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br /><link rel="stylesheet" type="text/css" href="css/3.css"/><br /><style type="text/css"><br />table.gridtable <br />{<br />border-collapse: collapse<br />}<br /></style><br /><table class="gridtable" ><br /><br /><br /><tr><th>账号1</th><th>用户名1</th><th>密码1</th></tr><br /><?php<br />mysql_connect("localhost", "root", "a");<br />mysql_select_db("zhanghao");<br /><br />/* 查找test1表中ID为1的那行所有的数据 */<br />$sql = "SELECT * FROM 宿舍";<br /><br />/* 执行查找 */<br />$result = mysql_query($sql);<br />$row=mysql_num_rows($result);//返回取得的数据列的数目<br />if($row){ //判断数据库中是否有值<br />while($row2=mysql_fetch_array($result)){ //注意括号结束的位置<br /><br /><br />$账号=$row2['账号'];<br />$用户名=$row2['用户名'];<br />$密码=$row2['密码'];<br />?><br /><tr><td><?php echo $账号 ?></td><td><?php echo $用户名 ;?></td><td><?php echo $密码;?></td></tr><br /><?php } //while循环结束的括号<br />} //if结束的括号<br />?><br /></table>
------解决思路----------------------

------解决思路----------------------
顶3#


Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

How to enable or disable taskbar thumbnail previews on Windows 11

What are the differences between Huawei GT3 Pro and GT4?

10 Ways to Adjust Brightness on Windows 11
