【发布时间】:2022-01-01 03:38:26
【问题描述】:
我正在使用这个 google maps 插件,它不允许您更改地图标题的样式。开发人员告诉我用自定义 CSS 更改它。
由于我是初学者,我不知道该怎么做,因为我没有元素的 id,只有类。
当我从 h2 更改为 h3 时,这就是我想要它做的事情,但这只是在检查器中。我需要永久应用它。
<h2 class="widgettitle">Marinas and tours</h2>
然后我在插件文件中唯一能找到的小部件标题是以下代码,在将其从 h2 更改为 h3 后,它完全没有任何作用:
// initialize widgets
static function widgets_init() {
$options = GMWP::get_options();
register_widget('GoogleMapsWidget');
if (!$options['disable_sidebar']) {
register_sidebar( array(
'name' => __('Google Maps Widget PRO hidden sidebar', 'google-maps-widget'),
'id' => 'google-maps-widget-hidden',
'description' => __('Widgets in this area will never be shown anywhere in the theme. Area only helps you to build maps that are displayed with shortcodes.', 'google-maps-widget'),
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
} // if activated
} // widgets_init
我希望我能得到一些帮助
【问题讨论】:
-
您能否再解释一下为什么您必须更改 HTML 而不是按照建议的那样更改 CSS?
标签: html css plugins html-heading