Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

the code a.hover is not working on a domain basis

  • 2 trả lời
  • 6 gặp vấn đề này
  • 14 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

Working global code in userContent.css : a:hover {

 color: white !important;
 background-color: #C00000 !important;
 text-decoration: none !important;

}

That caused a problem with one website so I want to set that rule per domain : @-moz-document domain(facebook.com) {

 a.hover {
   color: white !important;
   background-color: #C00000 !important;
   text-decoration: none !important;
   }

} I had it working some time ago but I must have done something different. In the editor, the words hover and color are blue instead of brown and the code is not working. The same for other sites.

How do I correct the code?

Working global code in userContent.css : a:hover { color: white !important; background-color: #C00000 !important; text-decoration: none !important; } That caused a problem with one website so I want to set that rule per domain : @-moz-document domain(facebook.com) { a.hover { color: white !important; background-color: #C00000 !important; text-decoration: none !important; } } I had it working some time ago but I must have done something different. In the editor, the words hover and color are blue instead of brown and the code is not working. The same for other sites. How do I correct the code?
Đính kèm ảnh chụp màn hình

Giải pháp được chọn

It is probably better not to use the !important flag for the background-color to avoid specific issues to make it possible for a website to handle this (background image).

Đọc câu trả lời này trong ngữ cảnh 👍 4

Tất cả các câu trả lời (2)

more options

I have sorted it out :

@-moz-document domain(facebook.com) { a:hover {

 color: white !important;
 background-color: #C00000 !important;
 text-decoration: none !important;
 }

}

Được chỉnh sửa bởi ender21 vào

more options

Giải pháp được chọn

It is probably better not to use the !important flag for the background-color to avoid specific issues to make it possible for a website to handle this (background image).