Home > Web Front-end > CSS Tutorial > Why Doesn\'t CSS `::after` Style My `` Element in WebKit?

Why Doesn\'t CSS `::after` Style My `` Element in WebKit?

DDD
Release: 2024-11-29 09:04:10
Original
835 people have browsed it

Why Doesn't CSS `::after` Style My `` Element in WebKit?

Styling element without resorting to images, the following HTML and CSS were implemented:

HTML:

<select name="">
  <option value="">Test</option>
</select>
Copy after login

CSS:

select {
  -webkit-appearance: none;
  background: black;
  border: none;
  border-radius: 0;
  color: white;
}

select::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: blue;
}
Copy after login

However, the expected result of a split elements are handled by the operating system, overriding the styling applied through CSS.

The above is the detailed content of Why Doesn\'t CSS `::after` Style My `` Element in WebKit?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template