我真的很愚蠢地问这个问题,这是样式化CSS链接的基础知识。
而且,今天,我一直试图为链接设置一整天的样式,但没有成功,样式表不想将其应用于所需的外观。
这是样式表公共A:

A:link {text-decoration: none; color: white;}
A:visited {text-decoration: none; color: white;}
A:active {text-decoration: none; color: white;}
A:hover {text-decoration: underline; color: red;}


如果我尝试使用它的代码,这就是块(它在查询数据库的while循环中)

$query=$db->prepare("SELECT post_id, title, body, category FROM posts INNER JOIN categories ON categories.category_id=posts.category_id ORDER BY post_id DESC");
    $query->execute();
    $query->bind_result($post_id, $title, $body, $category);
while($query->fetch()):?>
    <?php $lastspace = strrpos($body, ' ');?>
    <article>
    <h2><?php echo $title?></h2>
    <?php echo  $category;?>
    <?php echo "<hr>";?>
    <p><?php echo nl2br (substr($body,0,$lastspace)). "<a href='post.php?id=$post_id'>Read More</a>"?></p>
    <?php echo "<hr>"?>
    </article>
    <?php endwhile ?>


好的,就是这样。我做错了什么/如何解决?

最佳答案

清除缓存有效。我本来应该想到的。

10-04 21:26
查看更多