我想知道如何在 php 中设置 echo 样式?我试图设置嵌套在其中一个回声中的段落标签的样式,如果有人能告诉我如何做到这一点,我将不胜感激。谢谢
PHP
if(isset($_SESSION['sess_user_id']) && $_SESSION['sess_user_name'] != "") {
echo '<h1>Welcome '.$_SESSION['sess_user_name'].'</h1>';
echo "<p id="profileText"This is your personal profile page, from here you can edit events</p>";
echo '<h4><a href="logout.php">Logout</a></h4>';
}
else {
header('location:index.php');
CSS
#profileText {
top: 40%;
position: absolute;
color: blue;
}
呼如林
回首忆惘然