html - Echo php using CSS Content: property -
i need echo php using css content: property.
php:
<?php $links = "<a href=\"https://www.facebook.com\" target=\"_blank\"><img src=\"images/fb.png\" width=\"16\" height=\"16\"></a> <a href=\"https://twitter.com\" target=\"_blank\"><img src=\"images/twitter.png\" width=\"16\" height=\"16\"></a>"; ?>
css:
body li:nth-child(2):after{ content: "<?php echo "$links"; ?>"; color:#fff; }
html:
<ul> <li>date</li> <li>time</li> </ul>
desired output:
date time fb tw
try like
css: body li:nth-child(2):after{ content: "<?php echo $links; ?>"; color:#fff; }
you can try like
content: <?php echo $links; ?>;
assuming css
in same file php
Comments
Post a Comment