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
DDDOriginal
2024-11-29 09:04:10915browse

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>

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;
}

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!

Statement:
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