自驾旅游服务网站开发文献综述,网站内容有什么,视频网站建设 方案,如何网络营销手动创建线程池 效果会更好Most browsers has their own default, outline style for the :focus psuedo-class.大多数浏览器对于#xff1a;focus psuedo-class具有其默认的轮廓样式。 Chrome’s default outline styleChrome浏览器的默认轮廓样式 This outline style is cr…手动创建线程池 效果会更好Most browsers has their own default, outline style for the :focus psuedo-class. 大多数浏览器对于focus psuedo-class具有其默认的轮廓样式。 Chrome’s default outline styleChrome浏览器的默认轮廓样式 This outline style is crucial for accessibility, especially when it comes to keyboard navigation, so removing it isn’t considered a good thing. 本大纲的风格是可访问性是至关重要的尤其是当它涉及到键盘导航所以删除它不被认为是一件好事 。 However, it is OK to do so if you replace the styling with something else. 但是 如果将样式替换为其他样式 则可以这样做。 I’m not a huge fan of the default browser outline. Take chrome’s for example. I think the color is too light and the border too thin. Sure, you can always change the color and thickness. Like this: 我不是默认浏览器轮廓的忠实拥护者。 以Chrome为例。 我认为颜色太浅边框太细。 当然您可以随时更改颜色和厚度。 像这样 Overridden outline style覆盖轮廓样式 This approach is fine, but a “problem” with outline property is that it doesn’t follow the rounded corners. Personally I would prefer if this wasn’t the case so I tend to go with a different solution. 这种方法很好但是具有outline属性的“问题”在于它没有遵循圆角。 就个人而言如果不是这种情况我会更喜欢所以我倾向于采用其他解决方案。 改用盒子阴影 (Use box-shadow instead) You can achieve the same result using box-shadow. Here’s how: 您可以使用box-shadow获得相同的结果。 这是如何做 The box-shadow creates a outline-like style盒子阴影营造出轮廓般的风格 This will now be applied to every element’s default focus style. Like for the inputs in this form: 现在它将应用于每个元素的默认焦点样式。 像这种形式的输入 However, these inputs have a border and I don’t think it looks that good when you have both the borders and the box-shadow-effect. 但是这些输入都带有边框当您同时具有边框和阴影效果时我认为它看起来并不好 。 You can get around that by removing the border-color upon focus: 您可以通过删除焦点上的边框颜色来解决此问题 Simply remove the border-color只需删除边框颜色 外卖 (Take aways) Box-shadow is a nice way to get around the disadvantages of the outline-property. Keep in mind that elements that have a box-shadow property on the element itself could create some “icky” results: Box-shadow是解决轮廓属性缺点的好方法。 请记住在元素本身具有box-shadow属性的元素可能会产生一些“棘手的”结果 EwwEWW You’ll have to counter this by adding the focus-styled box-shadow to the element’s box-shadow upon focus. 您必须通过在焦点上将焦点样式的盒子阴影添加到元素的盒子阴影中来对此进行反击。 Better更好 翻译自: https://uxdesign.cc/create-better-accessible-focus-effects-75a3de27b8ba手动创建线程池 效果会更好