`
zhangyaochun
  • 浏览: 2595653 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

-moz-user-select属性

阅读更多

其实这个在屏蔽右键与页面内容选中的脚本这篇文章已经简单地提到了,这篇来细讲一下。

 

它主要有3个值:

 

  • none
           子元素所有的文字都不能选择,包括input输入域中的文字
  • -moz-all
           子元素所有的文字都可以被选择,但是input输入域中的文字不能被选择
  • -moz-none
          子元素所有文字多不能选择,除掉input输入域中的文字。
分享到:
评论

相关推荐

    css 让文字不被选中之-moz-user-select 属性介绍

    而在firefox下,文字不会被选中,查看google calender的css,原来还有-moz-user-select这个属性,很好玩! 最后采用一个了js方法,即onselectstart=function{return false;},不让页面进行选择,呵呵,这是很多网站...

    -moz-user-select与onselectstart 禁止选择文字的方法

    本文将详细介绍如何使用`-moz-user-select`和`onselectstart`属性来禁止文本选择,并讨论它们在不同浏览器中的兼容性和应用。 `-moz-user-select`是Mozilla Firefox浏览器特有的CSS属性,用于控制元素是否允许用户...

    滤镜问题-FireFox火狐浏览器与IE的对比分析

    - `*-moz-user-select`: 设置用户选择状态。 3. **其他属性**: - `*-moz-float-edge`: 设置浮动边缘。 - `*-moz-border-end`: 设置边框结束位置。 - `*-moz-border-end-color`: 设置边框结束位置的颜色。 - `...

    火狐兼容代码

    8. `user-select`: 控制用户能否选中文本的属性,Firefox 使用 `-moz-user-select`,如 `-moz-user-select: none;` 可阻止文本被选中。 9. `transition` 和 `animation`: 这些CSS3动画和过渡效果在Firefox中也需要 ...

    通过CSS规则禁止选中文字的实现代码

    语法 Formal syntax: none | text | all | element 复制代码代码如下:(-prefix-)user-select: none;(-prefix-)user-select: text;... /* Chrome all / Safari all */ -moz-user-select: none; /* Firef

    CSS禁止文字选择user-select应用

    需要注意的是:user-select并不是一个W3C的CSS标准属性,浏览器支持的不完整,需要对每种浏览器进行调整 复制代码代码如下: body{ -moz-user-select: none; /*火狐*/ -webkit-user-select: none; /*webkit浏览器*/ ...

    禁止选中文字兼容IE、Chrome、FF等

    代码如下: $(el).attr(‘unselectable’,’on’) .css({‘-moz-user-select’:’-moz-none’, ‘-moz-user-select’:’none’, ‘-o-user-select’:’none’, ‘-khtml-user-select’:’none’, /* you could also ...

    css禁止html标签被选中的方法

    首先,CSS中的`user-select`属性用于控制用户是否可以选择元素的内容。当设置为`none`时,元素的内容将无法被用户选中。然而,由于不同的浏览器对这一属性的支持程度不同,我们需要使用一系列的前缀来确保跨浏览器的...

    jQuery 1.8 正式版

    当你在 .css() 和 .animate() 中使用 CSS 属性时,jQuery 会自动根据浏览器类型来设置一些前缀,例如 .css("user-select", "none") 在 Chrome/Safari 会变成 "-webkit-user-select", 在 Firefox 变成 "-moz-user-...

    JavaScript编写一个贪吃蛇游戏

    写的比较乱,有个逻辑错误:蛇吃了果果后应该是蛇尾加一节,写成了蛇头部增加一节- -...-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none; -moz-user-select:none; -ms-user-

    js鼠标移动时禁止选中文字

    这是通过CSS样式来实现的禁止用鼠标选择功能: unselectable为IE准备 onselectstart为Chrome、Safari准备 -moz-user-select是FF的 css style:html,body{-moz-user-...屏蔽选择的样式定义:-moz-user-select属性(只

    HTML页面内容禁止选择、复制、右键

    在CSS中,可以为页面的根元素`<html>`或特定的元素应用`user-select`属性来达到这个目的。这个属性允许我们控制用户是否能选择元素内的文本。例如,以下代码会禁止整个页面的文本选择: ```css html { -webkit-...

    CSS3鼠标悬停文字边框背景动画特效.zip

     -moz-user-select: none;  -ms-user-select: none;  user-select: none; } .btn:before, .btn:after { content: ''; position: absolute; -webkit-transition: inherit; transition: inherit; z-...

    用html语句防止别人复制你的网页内容

    CSS中的`user-select`属性可以用于禁止用户选中文本。以下是一个示例: ```css body { -webkit-user-select: none; /* 针对Chrome和Safari */ -moz-user-select: none; /* 针对Firefox */ -ms-user-select: none...

    解除网页文字复制限制

    2. **CSS禁用选择**:通过设置CSS属性`user-select`为`none`,可以阻止用户选中文本。例如:`* { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }` 3. **框架和...

    基于Vue如何封装分页组件

    使用Vue做双向绑定的时候,可能经常会用到分页功能 接下来我们来封装一个分页组件 先定义样式文件 pagination.css ... -moz-user-select: none; -ms-user-select: none; user-select: none; } .page-button-disabl

Global site tag (gtag.js) - Google Analytics