我想添加CSS样式
right: 10px
top: 10px
:
<?php echo DISPLAY_ULTIMATE_PLUS(); ?>
我如何将这两者连接起来?我该把:
放在哪里呢?<?php echo DISPLAY_ULTIMATE_PLUS(); ?>
? ?
因为这是Wordpress,它说"将代码放入主题代码中"
谢谢
您需要将代码放置在主题文件中的适当位置。
因为你想给它应用一些样式,你可以把它包装在一个div中,并为它分配一个类。
<div class="social_buttons">
<?php echo DISPLAY_ULTIMATE_PLUS(); ?>
</div>
然后将CSS添加到样式表中,通常在主题文件夹中找到,命名为"style.css"。
.social_buttons{
right: 10px
top: 10px
}
你可以用这个
<style>
.notificacion {
background: red;
border-radius: 0.8em;
-moz-border-radius: 0.8em;
-webkit-border-radius: 0.8em;
color: #ffffff;
display: inline-block;
font-weight: bold;
line-height: 1.6em;
margin-right: 15px;
text-align: center;
width: 1.6em;
}
</style>
<?php
$a=3;
echo '<div class="notificacion">', $a,'</div>';?>
D