当我通过:: selection更改我网站的CSS中的突出显示颜色时,如果我按下CTRL + A,则页面的某些部分不是颜色。请帮忙?我尝试将整个页面放在div包装器中,但它没有帮助。感谢。
修改 我添加了
img.webpage-logo::selection{
background-color: none;
}
它有效......?当我添加更多样式时,它停止了工作。以前,我很困惑。现在我傻眼了。
HTML:
<!DOCTYPE html>
<html>
<head>
<title>webpage</title>
<link rel="stylesheet" type="text/css" href="CSS/style.css">
</head>
<body>
<img class="webpage-logo" src="Images/Header/Logo/webpage-logo.png">
<img src="Images/Header/Search/search-icon.png">
<img src="Images/Content/Button/get-started-button.png">
<img src="Images/Content/Share/sharing.png">
<img src="Images/Content/Share/sharing-highlight.png">
<img src="Images/Form/Arrow/arrow.png">
<img src="Images/Form/Background/form-background.png">
<img src="Images/Form/Spam/check.png">
<img src="Images/Form/Spam/check-box.png">
<img src="Images/Form/Submit/submit-button.png">
<img src="Images/Footer/Logo/footer-webpage-logo.png">
</body>
</html>
CSS:
/*browser text selection*/
::-moz-selection {
background-color: #e75b5b;
color: #505050;
}
::selection{
background-color: #e75b5b;
color: #5a5a5a;
}
/**THIS WORKED...HOWWWWWWWW??!?!??!?!?!?!?!?!?!?!!??**/
img.webpage-logo::selection{
background-color: none;
}
/*actual website.....*/
body{
background-color:#e5e5e5;
}