Php 我的WordPress CSS一夜之间停止工作
昨晚和今早,我的WordPress网站运行良好。直到早些时候,我的CSS才正常工作 当您将鼠标悬停在某个嵌套在某个Php 我的WordPress CSS一夜之间停止工作,php,jquery,html,css,wordpress,Php,Jquery,Html,Css,Wordpress,昨晚和今早,我的WordPress网站运行良好。直到早些时候,我的CSS才正常工作 当您将鼠标悬停在某个嵌套在某个下的某个菜单上时,应该会出现带有过渡的悬停效果。当页面加载直到滚动功能被激活才显示时,我的owl转盘停止工作 我怀疑这是我的缓存的问题,但我尝试使用Stackpath CDN来解决这个问题,但它没有改变任何东西。我真不知道该怎么办 在“自定义”菜单上,悬停颜色的控件也不适用于菜单链接 这是我的网站:styleherclock.co.uk 这是我的JavaScript文件: j
下的某个菜单上时,应该会出现带有过渡的悬停效果。当页面加载直到滚动功能被激活才显示时,我的owl转盘停止工作
我怀疑这是我的缓存的问题,但我尝试使用Stackpath CDN来解决这个问题,但它没有改变任何东西。我真不知道该怎么办
在“自定义”菜单上,悬停颜色的控件也不适用于菜单链接
这是我的网站:styleherclock.co.uk
这是我的JavaScript文件:
jQuery(document).ready(function(){
// owl caroussel
jQuery(".owl-carousel").owlCarousel({
items:1,
navRewind:true,
center:true,
autoplay:true,
autoplayTimeout:3000
});
/* end of owl caroussel */
// adobe typekit
try{
Typekit.load({ async: true });
}
catch(e){}
// end of typekit
jQuery(window).scroll(function(){
if(window.pageYOffset > 394){
jQuery("#access").css({"position":"fixed",
"z-index":"2",
"left":"0px",
"top":"0px",
"border":"0px",
"border-width":"1px",
"border-bottom-style":"solid",
"margin-top":"auto"
/*"padding-top":"2.5em" */});
}
if(window.pageYOffset < 394){
jQuery("#access").css({"position":"initial",
"padding":"0px",
"border-top":"1px",
"border-bottom":"1px",
"border-top-style":"solid",
"border-bottom-style":"solid",
"margin-top":"0.5em"
});
}
}); // end of scroll function
// code for the footer area
jQuery("#first,#second,#third,#fourth").addClass("col-xs col-sm-1 col-md-3 col-3");
jQuery("#footer-widget-area").addClass("row");
jQuery("#primary, #secondary").addClass("col-xs col-sm-3");
jQuery(".small-nav i").click(function(){
jQuery("div.menu").slideToggle("slow");
});
});
这是我的functions.php文件
function customizer_css(){
?>
<style type="text/css">
*h1 {
<?php echo get_theme_mod('h1_font'); ?>;
}
* h2 {
<?php echo get_theme_mod('h2_font'); ?>;
}
*h3 {
<?php echo get_theme_mod('h3_font'); ?>;
}
*h4 {
<?php echo get_theme_mod('h4_font'); ?>;
}
*h5 {
<?php echo get_theme_mod('h5_font'); ?>;
}
* p {
<?php echo get_theme_mod('p_font'); ?>;
}
*a {
<?php echo get_theme_mod('a_font'); ?>;
}
#site-title {
<?php echo get_theme_mod('title_position'); ?>
font-size:<?php echo get_theme_mod('title_size'); ?>em !important;
}
#primary a, #secondary a {
<?php echo get_theme_mod('widget_a_font'); ?>;
}
#small-menu, #access, #wrapper,#footer #colophon{
background-color:<?php echo get_theme_mod('website_colour') ?> !important;
}
#header-bg {
background-image: url('<?php echo get_header_image(); ?>');
background-color: <?php echo get_theme_mod('header_colour'); ?> ;
background-position: <?php echo get_theme_mod('header_bg_position_x_lg','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_lg','0%'); ?> !important;
}
#main a, #footer-widget-area a {
color: <?php echo get_theme_mod('link_colour'); ?> !important ;
}
.current_page_item a, #access .menu ul a:hover {
background-color: <?php echo get_theme_mod('hover_colour'); ?> !important ;
}
#access .el:hover {
color: <?php echo get_theme_mod('hover_colour'); ?> !important ;
}
h1#site-title a{
<?php echo get_theme_mod('title_font_style'); ?>;
}
@media screen and (max-width:767px) {
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_xs','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_xs','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_xs'); ?>
font-size:<?php echo get_theme_mod('title_size_xs'); ?>em !important;
}
} /* end of mobile size */
@media screen and (min-width:768px) and (max-width:991px){
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_sm','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_sm','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_sm'); ?>
font-size:<?php echo get_theme_mod('title_size_sm'); ?>em !important;
}
} /* end of small*/
@media screen and (min-width:992px) and (max-width:1199px){
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_md','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_md','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_md'); ?>
font-size:<?php echo get_theme_mod('title_size_md'); ?>em !important;
}
} // end of medium
</style>
<?php
}
//add actions
add_action('wp_enqueue_scripts','style_n_scripts');
//theme customizer api
add_action( 'customize_register', 'customizer_api' );
//theme support
add_action('init', 'shc_theme_support');
// theme customizer css
add_action( 'wp_head', 'customizer_css');
函数定制器_css(){
?>
*h1{
;
}
*氢{
;
}
*h3{
;
}
*h4{
;
}
*h5{
;
}
*p{
;
}
*a{
;
}
#网站名称{
字体大小:em!重要;
}
#初级a,#次级a{
;
}
#小菜单,#访问,#包装,#页脚#树脂{
背景色:!重要;
}
#标题背景{
背景图像:url(“”);
背景色:;
背景位置:
!重要;
}
#主a,#页脚小部件区域a{
颜色:!重要;
}
.current_page_item a,#access.菜单ul a:悬停{
背景色:!重要;
}
#进入。埃尔:悬停{
颜色:!重要;
}
h1#现场标题a{
;
}
@媒体屏幕和屏幕(最大宽度:767px){
#标题背景{
背景位置:
!重要;
}
#网站名称{
字体大小:em!重要;
}
}/*移动终端尺寸*/
@媒体屏幕和(最小宽度:768px)和(最大宽度:991px){
#标题背景{
背景位置:
!重要;
}
#网站名称{
字体大小:em!重要;
}
}/*小型企业结束*/
@媒体屏幕和(最小宽度:992px)和(最大宽度:1199px){
#标题背景{
背景位置:
!重要;
}
#网站名称{
字体大小:em!重要;
}
}//中端
在style.css行中:386删除float
#access{float:none;}
看起来像是css问题/冲突。当删除样式表第386行id为#access
的元素上的float:left;
时,它会得到修复,并显示旋转木马
或者将类clearfix
添加到id为#header
的元素中
阅读更多关于的信息可能希望检查源代码中可能存在的html错误,甚至firebug或其他内容,以查看是否存在javascript错误。。
function customizer_css(){
?>
<style type="text/css">
*h1 {
<?php echo get_theme_mod('h1_font'); ?>;
}
* h2 {
<?php echo get_theme_mod('h2_font'); ?>;
}
*h3 {
<?php echo get_theme_mod('h3_font'); ?>;
}
*h4 {
<?php echo get_theme_mod('h4_font'); ?>;
}
*h5 {
<?php echo get_theme_mod('h5_font'); ?>;
}
* p {
<?php echo get_theme_mod('p_font'); ?>;
}
*a {
<?php echo get_theme_mod('a_font'); ?>;
}
#site-title {
<?php echo get_theme_mod('title_position'); ?>
font-size:<?php echo get_theme_mod('title_size'); ?>em !important;
}
#primary a, #secondary a {
<?php echo get_theme_mod('widget_a_font'); ?>;
}
#small-menu, #access, #wrapper,#footer #colophon{
background-color:<?php echo get_theme_mod('website_colour') ?> !important;
}
#header-bg {
background-image: url('<?php echo get_header_image(); ?>');
background-color: <?php echo get_theme_mod('header_colour'); ?> ;
background-position: <?php echo get_theme_mod('header_bg_position_x_lg','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_lg','0%'); ?> !important;
}
#main a, #footer-widget-area a {
color: <?php echo get_theme_mod('link_colour'); ?> !important ;
}
.current_page_item a, #access .menu ul a:hover {
background-color: <?php echo get_theme_mod('hover_colour'); ?> !important ;
}
#access .el:hover {
color: <?php echo get_theme_mod('hover_colour'); ?> !important ;
}
h1#site-title a{
<?php echo get_theme_mod('title_font_style'); ?>;
}
@media screen and (max-width:767px) {
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_xs','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_xs','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_xs'); ?>
font-size:<?php echo get_theme_mod('title_size_xs'); ?>em !important;
}
} /* end of mobile size */
@media screen and (min-width:768px) and (max-width:991px){
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_sm','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_sm','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_sm'); ?>
font-size:<?php echo get_theme_mod('title_size_sm'); ?>em !important;
}
} /* end of small*/
@media screen and (min-width:992px) and (max-width:1199px){
#header-bg {
background-position: <?php echo get_theme_mod('header_bg_position_x_md','0%'); ?>
<?php echo get_theme_mod('header_bg_position_y_md','0%'); ?> !important;
}
#site-title {
<?php echo get_theme_mod('title_position_md'); ?>
font-size:<?php echo get_theme_mod('title_size_md'); ?>em !important;
}
} // end of medium
</style>
<?php
}
//add actions
add_action('wp_enqueue_scripts','style_n_scripts');
//theme customizer api
add_action( 'customize_register', 'customizer_api' );
//theme support
add_action('init', 'shc_theme_support');
// theme customizer css
add_action( 'wp_head', 'customizer_css');