改变桌子上的背景?
正如您可以通过下面的脚本看出的那样,我遇到了一个问题,我不会详细介绍该脚本的作用,因为仅根据阅读脚本就可以很明显地看出...
<body background="Background here" bgproperties="fixed">
<?php
$DBNAME="login info here";
$DBUSER="login info here";
$DBPASSWORD="login info here";
$DBHOST="login info here";
//Connection is below
mysql_connect($DBHOST, $DBUSER, $DBPASSWORD) or die("<center>Cannot connect to MySQL</center>");
mysql_select_db($DBNAME) or die("<center>Cannot Connect to MYSQL</center>");
$sql = 'SELECT `nick`, `votes` FROM `votesdb` ORDER BY `votes` desc LIMIT 0, 10 ';
$result=mysql_query($sql);
$fields_num = mysql_num_fields($result);
echo "{$table}</h1>";
echo "<table border='0' bgcolor=#FFFFFF><tr>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
$field = mysql_fetch_field($result);
echo "<td>{$field->name}</td>";
}
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
echo "<tr>";
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td>$cell</td>";
echo "</tr>\n";
}
mysql_free_result($result);
?>
正如您可以通过去这里:[http://legacyserver.info/fbxtop.php][1] 表格背景与图像不融合,平铺背景在页面的其余部分,显然,这看起来又丑又奇怪,我怎样才能将表格的背景更改为页面其余部分的背景!我尝试用谷歌搜索,但没有成功。请帮忙! :)
显然我还需要弄清楚如何更改文本颜色:)
As you can tell by the script below, I have a problem, I'm not going to go into much detail as to what the script does, because it is pretty obvious based on just reading the script...
<body background="Background here" bgproperties="fixed">
<?php
$DBNAME="login info here";
$DBUSER="login info here";
$DBPASSWORD="login info here";
$DBHOST="login info here";
//Connection is below
mysql_connect($DBHOST, $DBUSER, $DBPASSWORD) or die("<center>Cannot connect to MySQL</center>");
mysql_select_db($DBNAME) or die("<center>Cannot Connect to MYSQL</center>");
$sql = 'SELECT `nick`, `votes` FROM `votesdb` ORDER BY `votes` desc LIMIT 0, 10 ';
$result=mysql_query($sql);
$fields_num = mysql_num_fields($result);
echo "{$table}</h1>";
echo "<table border='0' bgcolor=#FFFFFF><tr>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
$field = mysql_fetch_field($result);
echo "<td>{$field->name}</td>";
}
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
echo "<tr>";
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td>$cell</td>";
echo "</tr>\n";
}
mysql_free_result($result);
?>
As you can tell by going here: [http://legacyserver.info/fbxtop.php][1]
The tables background does not blend with the image,tiling background on the rest of the page, obviously, this looks ugly and weird, How could I change the background of the table to the background of the rest of the page! I tried googling, but had no avail. Please help! :)
Obviously I also need to figure out how to change the text color too :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在表格上添加以下样式或为其指定一个具有以下样式的类名称:
您只需要更改表格的字体颜色即可。
On the table add the following style or give it a class name with the following style :
You will just have to change the font color for the table as well.
将样式属性添加到表格并将其设置为“背景颜色:透明;颜色:白色;”
喜欢,
Add the style attribute to table and set it to 'background-color: transparent;color: white;'
like,
只需添加以下内容:
如果您想在页面中心显示表格,您可以添加边距:
希望这有帮助:)
Just add this :
If you want to show table at the center of the page you can add margin:
Hope this helps :)