这看起来很简单,但我无法解决.
我有一个像这样的简单下拉菜单……
…而且我想应用一个平面边框(没有3D效果),所以我正在使用:
select { border:1px solID #CCC; }
在这里查看实时样本:http://jsfiddle.net/GqGr3/
它在firefox和IE中运行良好:
Firefox http://www.re-moto.com/usuario/select-1.png
但它在Chrome中呈现3D:
Chrome http://www.re-moto.com/usuario/select-2.png
这就是它在我的电脑中的工作方式.我在另一台计算机上测试了它,它呈现好.如果发生这种情况,我也会遇到其他用户.
我在Chrome中没有安装任何扩展程序,而且在windows 7上浏览器是最新的(18.0.1025.151米).
这些是样本的计算样式(包括继承),我没有看到任何奇怪的东西:
-webkit-animation-delay: 0s;-webkit-animation-direction: normal;-webkit-animation-duration: 0s;-webkit-animation-fill-mode: none;-webkit-animation-iteration-count: 1;-webkit-animation-name: none;-webkit-animation-play-state: running;-webkit-animation-timing-function: cubic-bezIEr(0.25,0.1,0.25,1);-webkit-appearance: menuList-button;-webkit-backface-visibility: visible;-webkit-background-clip: border-Box;-webkit-background-composite: source-over;-webkit-background-origin: padding-Box;-webkit-background-size: auto;-webkit-border-fit: border;-webkit-border-horizontal-spacing: 0px;-webkit-border-image: none;-webkit-border-vertical-spacing: 0px;-webkit-Box-align: center;-webkit-Box-direction: normal;-webkit-Box-flex: 0;-webkit-Box-flex-group: 1;-webkit-Box-lines: single;-webkit-Box-ordinal-group: 1;-webkit-Box-orIEnt: horizontal;-webkit-Box-pack: start;-webkit-Box-reflect: none;-webkit-Box-shadow: none;-webkit-color-correction: default;-webkit-column-axis: auto;-webkit-column-break-after: auto;-webkit-column-break-before: auto;-webkit-column-break-insIDe: auto;-webkit-column-count: auto;-webkit-column-gap: normal;-webkit-column-rule-color: rgb(0,0);-webkit-column-rule-style: none;-webkit-column-rule-wIDth: 0px;-webkit-column-span: 1;-webkit-column-wIDth: auto;-webkit-flex-align: stretch;-webkit-flex-direction: row;-webkit-flex-flow: row nowrap;-webkit-flex-item-align: auto;-webkit-flex-order: 0;-webkit-flex-pack: start;-webkit-flex-wrap: nowrap;-webkit-flow-from: none;-webkit-flow-into: auto;-webkit-Font-kerning: auto;-webkit-@R_502_2142@: auto;-webkit-Font-variant-ligatures: normal;-webkit-highlight: none;-webkit-hyphenate-character: auto;-webkit-hyphenate-limit-after: auto;-webkit-hyphenate-limit-before: auto;-webkit-hyphenate-limit-lines: no-limit;-webkit-hyphens: manual;-webkit-line-Box-contain: block inline replaced;-webkit-line-break: normal;-webkit-line-clamp: none;-webkit-line-grID: none;-webkit-line-grID-snap: none;-webkit-locale: auto;-webkit-margin-after-collapse: collapse;-webkit-margin-before-collapse: collapse;-webkit-marquee-direction: auto;-webkit-marquee-increment: 6px;-webkit-marquee-repetition: infinite;-webkit-marquee-style: scroll;-webkit-mask-attachment: scroll;-webkit-mask-Box-image: none;-webkit-mask-Box-image-outset: 0px;-webkit-mask-Box-image-repeat: stretch;-webkit-mask-Box-image-slice: 0 fill;-webkit-mask-Box-image-source: none;-webkit-mask-Box-image-wIDth: auto;-webkit-mask-clip: border-Box;-webkit-mask-composite: source-over;-webkit-mask-image: none;-webkit-mask-origin: border-Box;-webkit-mask-position: 0% 0%;-webkit-mask-repeat: repeat;-webkit-mask-size: auto;-webkit-nbsp-mode: normal;-webkit-perspective: none;-webkit-perspective-origin: 37px 10px;-webkit-print-color-adjust: economy;-webkit-region-break-after: auto;-webkit-region-break-before: auto;-webkit-region-break-insIDe: auto;-webkit-region-overflow: auto;-webkit-rtl-ordering: logical;-webkit-svg-shadow: none;-webkit-tap-highlight-color: rgba(0,0.199219);-webkit-text-combine: none;-webkit-text-decorations-in-effect: none;-webkit-text-emphasis-color: black;-webkit-text-emphasis-position: over;-webkit-text-emphasis-style: none;-webkit-text-fill-color: rgb(0,0);-webkit-text-orIEntation: vertical-right;-webkit-text-security: none;-webkit-text-stroke-color: rgb(0,0);-webkit-text-stroke-wIDth: 0px;-webkit-transform: none;-webkit-transform-origin: 37px 10px;-webkit-transform-style: flat;-webkit-Transition-delay: 0s;-webkit-Transition-duration: 0s;-webkit-Transition-property: all;-webkit-Transition-timing-function: cubic-bezIEr(0.25,1);-webkit-user-drag: auto;-webkit-user-modify: read-only;-webkit-user-select: text;-webkit-wrap-flow: auto;-webkit-wrap-margin: 0px;-webkit-wrap-padding: 0px;-webkit-wrap-through: wrap;-webkit-writing-mode: horizontal-tb;alignment-baseline: auto;background-attachment: scroll;background-clip: border-Box;background-color: white;background-image: none;background-origin: padding-Box;background-position: 0% 0%;background-repeat: repeat;background-size: auto;baseline-shift: baseline;border-bottom-color: #CCC;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;border-bottom-style: solID;border-bottom-wIDth: 1px;border-collapse: separate;border-image-outset: 0px;border-image-repeat: stretch;border-image-slice: 100%;border-image-source: none;border-image-wIDth: 1;border-left-color: #CCC;border-left-style: solID;border-left-wIDth: 1px;border-right-color: #CCC;border-right-style: solID;border-right-wIDth: 1px;border-top-color: #CCC;border-top-left-radius: 0px;border-top-right-radius: 0px;border-top-style: solID;border-top-wIDth: 1px;bottom: auto;Box-shadow: none;Box-sizing: border-Box;caption-sIDe: top;clear: none;clip: auto;clip-path: none;clip-rule: nonzero;color: black;color-interpolation: srgb;color-interpolation-filters: linearrgb;color-rendering: auto;cursor: default;direction: ltr;display: inline-block;dominant-baseline: auto;empty-cells: show;fill: #000000;fill-opacity: 1;fill-rule: nonzero;filter: none;float: none;flood-color: rgb(0,0);flood-opacity: 1;Font-family: Arial;Font-size: 13px;Font-style: normal;Font-variant: normal;Font-weight: normal;glyph-orIEntation-horizontal: 0deg;glyph-orIEntation-vertical: auto;height: 20px;image-rendering: auto;kerning: 0;left: auto;letter-spacing: normal;lighting-color: rgb(255,255,255);line-height: normal;List-style-image: none;List-style-position: outsIDe;List-style-type: disc;margin-bottom: 2px;margin-left: 2px;margin-right: 2px;margin-top: 2px;marker-end: none;marker-mID: none;marker-start: none;mask: none;max-height: none;max-wIDth: none;min-height: 0px;min-wIDth: 0px;opacity: 1;orphans: 2;outline-color: black;outline-style: none;outline-wIDth: 0px;overflow-x: visible;overflow-y: visible;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;page-break-after: auto;page-break-before: auto;page-break-insIDe: auto;pointer-events: auto;position: static;resize: none;right: auto;shape-rendering: auto;speak: normal;stop-color: rgb(0,0);stop-opacity: 1;stroke: none;stroke-dasharray: none;stroke-dashoffset: 0;stroke-linecap: butt;stroke-linejoin: miter;stroke-miterlimit: 4;stroke-opacity: 1;stroke-wIDth: 1;table-layout: auto;text-align: -webkit-auto;text-anchor: start;text-decoration: none;text-indent: 0px;text-overflow: clip;text-rendering: auto;text-shadow: none;text-transform: none;top: auto;unicode-bIDi: normal;vector-effect: none;vertical-align: baseline;visibility: visible;white-space: pre;wIDows: 2;wIDth: 75px;word-break: normal;word-spacing: 0px;word-wrap: normal;writing-mode: lr-tb;z-index: auto;zoom: 1;
任何线索?最佳答案有趣……我也在windows 7 / Chrome 18上,边框的CSS样式正在按预期工作,直到我从Aero切换到’windows Classic’主题,此时你所描述的行为发生了.上面已经说过,这是一个windows *** 作系统问题,但我只是认为这可能会提供一些额外的清晰度.
更新:使用-webkit-appearance:none; CSS规则,似乎可以避免select元素的默认 *** 作系统样式.但是,它需要一些额外的CSS来维护元素的主要UI功能(即右侧的箭头按钮).这里有一个工作示例:http://jsfiddle.net/qZF4B/. 总结
以上是内存溢出为你收集整理的html – Chrome中的SELECT边框呈现3D全部内容,希望文章能够帮你解决html – Chrome中的SELECT边框呈现3D所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)