css鼠标指针光标样式_高级CSS光标–通过指针提高可用性

css鼠标指针光标样式

All browsers provide their own stylesheet which includes settings link colors (blue for unvisited and purple for visited, in IE's case), default padding and margins, text sizes, and cursors. Browsers provide the pointer cursor to make it obvious to the user that the text or image that serves as the link is clickable. What about the other cases for clicking on elements? These elements include:

所有浏览器都提供自己的样式表,其中包括设置链接颜色(对于IE,蓝色为未访问,紫色为已访问),默认填充和边距,文本大小以及光标。 浏览器提供了指针光标,以使用户可以明显看出用作链接的文本或图像是可单击的。 在其他情况下点击元素呢? 这些元素包括:

  • Input buttons (type button, submit, and reset)

    输入按钮(类型按钮,提交和重置)
  • Elements with an onclick event

    带有onclick事件的元素

  • Label elements

    标签元素
  • Select elements

    选择元素
  • Javascript triggers (Mootools Accordians, for example)

    Javascript 触发器 (例如Mootools Accordians)

It's clear that there's an opportunity to improve usability with some simple CSS. Since the focus of this is to improve usability and inconsistency in functionality would cause more harm than good, we'll use the proven CSS class method to apply our improvements. We'll also use general HTML element selectors.

显然,有机会通过一些简单CSS来提高可用性。 由于这样做的重点是提高可用性,而功能不一致会带来弊大于利的情况,因此,我们将使用经过验证CSS类方法来应用我们的改进。 我们还将使用常规HTML元素选择器。


select,label,.pointer { cursor:pointer; }

Apply the pointer class to button inputs, elements with onclick events, and JavaScript triggers. Do not use pseudo-classes such as input[type='submit'] as IE6 does not support this.

将指针类应用于按钮输入,具有onclick事件的元素以及JavaScript触发器。 请勿使用诸如input [type ='submit']之类的伪类,因为IE6不支持此类。

Another quick CSS addition to increase usability within minutes.

另一个快速添加CSS的功能,可在几分钟内增加可用性。

翻译自: https://davidwalsh.name/css-cursors-pointer

css鼠标指针光标样式

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值