手动创建线程池 效果会更好_创建更好的,可访问的焦点效果

手动创建线程池 效果会更好

Most browsers has their own default, outline style for the :focus psuedo-class.

大多数浏览器对于:focus psuedo-class具有其默认的轮廓样式。

Image for post
Chrome’s default outline style
Chrome浏览器的默认轮廓样式

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为例。 我认为颜色太浅,边框太细。 当然,您可以随时更改颜色和厚度。 像这样:

Image for post
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获得相同的结果。 这是如何做:

Image for post
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:

现在,它将应用于每个元素的默认焦点样式。 像这种形式的输入:

Image for post

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:

您可以通过删除焦点上的边框颜色来解决此问题:

Image for post
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属性的元素可能会产生一些“棘手的”结果:

Image for post
Eww
EWW

You’ll have to counter this by adding the focus-styled box-shadow to the element’s box-shadow upon focus.

您必须通过在焦点上将焦点样式的盒子阴影添加到元素的盒子阴影中来对此进行反击。

Image for post
Better
更好

翻译自: https://uxdesign.cc/create-better-accessible-focus-effects-75a3de27b8ba

手动创建线程池 效果会更好

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274828.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

eazy ui 复选框单选_UI备忘单:单选按钮,复选框和其他选择器

eazy ui 复选框单选重点 (Top highlight)Pick me! Pick me! No, pick me! In today’s cheat sheet we will be looking at selectors and how they differ. Unlike most of my other cheat sheets, this will focus on two components (radio buttons and checkboxes) side by…

VS2010 VC Project的default Include设置

http://blog.csdn.net/jeffchen/article/details/5491435 VS2010与以往的版本一个最大的不同是:VC Directory设置的位置和以前的版本不一样。VS2010之前,VC Directory的设置都是在IDE的Tools->Options中设置的;VS2010改为,分别…

初级中级高级_初级职位,(半)高级职位

初级中级高级As a recent hire at my new job, as expected, a lot of things seemed scary and overwhelming. The scariest part was not the unfamiliarity with certain tasks or certain tools, but in communicating with higher-level coworkers, managers and bosses. …

如何写好技术文章(看张鑫旭老师的直播总结

大家好,我是若川。持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列本文是…

iOS 流媒体 基本使用 和方法注意

项目里面需要添加视频方法 我自定义 选用的是 avplayer 没选择 MediaPlayer 原因很简单 , avplayer 会更容易扩展 有篇博客 也很好地说明了 使用avplayer的优越性 blog.csdn.net/think12/article/details/8549438在iOS開發上,如果遇到需要播放影片,…

figma下载_迁移至Figma

figma下载Being an intuitive and user-friendly tool and having the possibility of real-time collaboration are some of the main reasons people choose to use Figma. But the migration process to Figma may sometimes be painful or time-consuming. 人们选择使用Fig…

TypeScript 常用的新玩法

大家好,我是若川。持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列上周分…

面试官是怎样高效面试的(面试官的“套路”

大家好,我是若川。持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列最近正…

微服务负载均衡实现高可用_使用负载平衡实现大容量可用性

微服务负载均衡实现高可用Written by Yona Gidalevitz由Yona Gidalevitz撰写 Most users of the web are blissfully unaware of the sheer scale of the process responsible for bringing content across the Internet. There are literally miles of Internet between you …

19岁中专学历是怎么在广州找到前端工作的?

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列本文来…

tcp 接收端优雅的写法_如何更优雅地接收设计反馈

tcp 接收端优雅的写法重点 (Top highlight)It’s rare to meet a designer that doesn’t take pride in their work. After all, we are creatives and it’s what we love to do. Although design is teachable, there is a bit of natural skill and talent that comes into…

一份 2.5k star 的《React 开发思想纲领》

大家好,我是若川。持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列翻译自…

文案写作软件_11种可改善网站用户体验的文案写作技术

文案写作软件Written by John Stevens约翰史蒂文斯 ( John Stevens)撰写 When we talk about user experience and your website, it is easy to get caught up in the site’s design and navigation options. While that is important, the words you place on the page are…

张小龙谈用户体验

原文:http://sd.csdn.net/a/20120510/2805483.html从Foxmail到腾讯“七星级产品”QQ邮箱,再到腾讯核武器级产品微信。在外界看来,腾讯副总裁、广州研发部总经理张小龙作风低调,很少接受正式的媒体采访。然而作为当今国内最优秀的产…

web开发集成数字证书_每个数字设计师都应该知道的Web开发的七个原则

web开发集成数字证书A career path into digital design is often winding, meaning many practitioners come from adjacent fields as diverse as graphic design, web development, research, or even anthropology. As a result, two people working in a similar role may…

前端工程师生产环境 debugger 技巧

大家好,我是若川。持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列导言开…

figma设计_Figma与Adobe XD:我们如何选择下一个设计工具

figma设计The time came for changes and our design team started raising the topic again about how we should consider moving away from Sketch. This is not the first time this question came to mind, but this time seems like it was serious. Last summer we cons…

一个小厂前端 Leader 如何筛选候选人?

大家好,我是若川。持续组织了8个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列本文作…

figma设计_如何在Figma中构建设计入门套件(第1部分)

figma设计Figma教程 (Figma Tutorial) Do you like staring at a blank canvas every time you start a new project in Figma?每次在Figma中启动新项目时,您是否喜欢盯着一块空白的画布? I’m guessing you’re not a big fan right, but it’s a pra…

纯靠技术,很难进入大厂了。。。

日前,国务院印发《“十四五”时期就业促进规划的通知》,其中明确指出,要完善终身学习体系,推进高水平大学开放教育资源,畅通在职人员继续教育与终身学习通道。为响应国家政策,现临时扩大招生规模&#xff0…