改变桌子上的背景?

发布于 2024-12-29 17:44:16 字数 1403 浏览 0 评论 0原文

正如您可以通过下面的脚本看出的那样,我遇到了一个问题,我不会详细介绍该脚本的作用,因为仅根据阅读脚本就可以很明显地看出...

<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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

北座城市 2025-01-05 17:44:16

在表格上添加以下样式或为其指定一个具有以下样式的类名称:

background-color: transparent;

您只需要更改表格的字体颜色即可。

On the table add the following style or give it a class name with the following style :

background-color: transparent;

You will just have to change the font color for the table as well.

一江春梦 2025-01-05 17:44:16

将样式属性添加到表格并将其设置为“背景颜色:透明;颜色:白色;”

喜欢,

echo "<table border='0' style='background-color: transparent; color: white;'><tr>";

Add the style attribute to table and set it to 'background-color: transparent;color: white;'

like,

echo "<table border='0' style='background-color: transparent; color: white;'><tr>";
半衾梦 2025-01-05 17:44:16

只需添加以下内容:

<table border='0' style='background-color: transparent; color: white;'>

如果您想在页面中心显示表格,您可以添加边距:

<table border='0' style='background-color: transparent; color: white;margin:0 auto;'>

希望这有帮助:)

Just add this :

<table border='0' style='background-color: transparent; color: white;'>

If you want to show table at the center of the page you can add margin:

<table border='0' style='background-color: transparent; color: white;margin:0 auto;'>

Hope this helps :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文