0

可能重复:
如何在我的 wordpress 插件中包含 CSS 和 jQuery?

我打算在 wordpress 插件上添加一个按钮

我想在按钮上添加一种样式,我知道将 css 调用到 html 文件中的基本方法。

<link rel="stylesheet" type="text/css" href="buttonPro.css">

但它不适用于 php 文件

4

1 回答 1

0

你可以这样称呼它:

<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>
/css/style.css" media="screen" />

当您的样式表位于名为“css”的子目录中并且实际文件名为“style.css”时。不要忘记在 php 中转义 HTML 代码:

<?php 
   put some php code here
?>

   **put some HTML code here**

<?php
   now you can continue with php
?>
于 2013-01-12T09:45:44.397 回答