我不知道该部分::-webkit-search-decoration在CSS选择器中做input[type="search"]::-webkit-search-decoration什么?
为什么这会导致en DOM Exception错误?
function is(selector, element) {
var div = document.createElement("div"),
matchesSelector = div.webkitMatchesSelector;
return typeof selector == "string" ? matchesSelector.call(element, selector) : selector === element;
}
is('input[type="search"]::-webkit-search-decoration', document.body);
Run Code Online (Sandbox Code Playgroud)
小智 5
它使您可以在多个浏览器中使搜索框看起来统一。例如,Chrome浏览器的默认样式不适用于某些设计。
这是该主题的一个很好的链接。 http://geek.michaelgrace.org/2011/06/webkit-search-input-styling/
| 归档时间: |
|
| 查看次数: |
7584 次 |
| 最近记录: |