mouse

Set mouse wheel to horizontal scroll using css

空扰寡人 提交于 2020-11-26 17:05:50
问题 I want to design a horizontal page. When I use mouse wheel it just scrolls content vertically. How can I use horizontal scroll by mouse wheel? Does CSS support this property? For example any thing like this: mouse-wheel:horizontal; I dont want jQuery solutions. 回答1: We can scroll the page horizontally by SHIFT key + scroll through mouse. 回答2: CSS does not support manipulation of mouse or keyboard inputs; input controls can only be manipulated via JavaScript. 回答3: Rotate the container by –90

Set mouse wheel to horizontal scroll using css

夙愿已清 提交于 2020-11-26 16:54:46
问题 I want to design a horizontal page. When I use mouse wheel it just scrolls content vertically. How can I use horizontal scroll by mouse wheel? Does CSS support this property? For example any thing like this: mouse-wheel:horizontal; I dont want jQuery solutions. 回答1: We can scroll the page horizontally by SHIFT key + scroll through mouse. 回答2: CSS does not support manipulation of mouse or keyboard inputs; input controls can only be manipulated via JavaScript. 回答3: Rotate the container by –90

javascript的鼠标事件

送分小仙女□ 提交于 2020-11-09 06:15:04
javascript的鼠标事件 是个比较庞大的家族。常见的有以下8个: mousedown:鼠标的键钮被按下。 mouseup:鼠标的键钮被释放弹起。 click:单击鼠标的键钮。 dbclick:鼠标的键钮被按下。 contextmenu :弹出右键菜单。 mouseover:鼠标移到目标的上方。 mouseout:鼠标移出目标的上方。 mousemove:鼠标目标的上方移动。 mousedown事件与mouseup事件可以说click事件在时间上的细分,顺序是mousedown => mouseup => click。因此一个点击事件,通常会激发几个鼠标事件。 有了它们,我们可以做许多事,但对于高层次的应用(如游戏)是显然不够的,于是鼠标事件的点击事件又根据究竟是点左键还是右键进行细分。在DOM2.0中,W3C对鼠标事件作了现范,鼠标事件被解析为MouseEvent(我们可以用e.constructor == MouseEvent来判断其是否为鼠标事件,是左键点击还是右键点击由它的一个叫button的属性判定。以下就是W3C的标准现范: 0:按下左键 1:按下中键(如果有的话) 2:按下右键 当然微软是不会妥协的,因为e.button本来就是微软最先实现的,网景用的是e.which,但相对而言,微软的复杂多了。 0:没有键被按下 1:按下左键 2:按下右键 3