为什么我的网站会为我更改 CSS? [英] Why does my site change my CSS for me?

查看:21
本文介绍了为什么我的网站会为我更改 CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 drupal 8 站点上安装了 jssor 幻灯片模块.我正在尝试使用幻灯片上的箭头来导航幻灯片.问题是正在添加

I have jssor slideshow module installed on my drupal 8 site. I am trying to have the arrows on the slides to navigate the slideshow. The problem is something is adding

display: none;

我的箭.当我删除终端中的行时,箭头会出现,但是当我将鼠标放回终端窗口之外的页面上时,箭头消失并且

to my arrows. When I remove the the line in the terminal the arrow appears but when I put my mouse back on the page out of the terminal window the arrow disappears and the

display: none;

线回来了.

这是什么原因造成的,我该如何阻止?

What causes this and how can I stop it?

推荐答案

您是否尝试过添加 display: block !important; ?我经常不得不使用 !important 来阻止我的 CSS 被其他模块覆盖.

Have you tried adding display: block !important; ? I often have to use the !important to stop my CSS being overridden by other modules.

解决此类问题的首选方法是确保以正确的顺序加载 CSS 文件(毕竟它是级联样式脚本).然而,在这种情况下,正如 CMS 类型站点(或那些您无权更改 CSS 文件的加载顺序的站点)的情况一样,!important 声明是解决方案.

The preferred method of resolving this kind of issue is to ensure that the CSS files are being loaded in the correct order (it is Cascading Style Script after all). However in this instance, and as is often the case with CMS type sites (or those where you don't have access to changing the loading order of the CSS files), the !important declaration is the solution.

这篇关于为什么我的网站会为我更改 CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆