<i
className={classNames({
'device-icon': true,
'camera-icon': true,
'camera-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.isCameraOpened === true,
})}
role="button"
tabIndex={0}
onClick={this.handleClickCamera}
labeltooltip="摄像头"
/>
<i
className={classNames({
'device-icon': true,
'mic-icon': true,
'mic-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.shouldVolumeGainBarShow === true,
})}
role="button"
tabIndex={0}
onClick={this.handleClickMic}
labeltooltip="麦克风"
/>
<i
className={classNames({
'device-icon': true,
'wifi-icon': true,
'wifi-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: false,
})}
role="button"
tabIndex={0}
onClick={() => {}}
labeltooltip="网络"
/>
<i
className={classNames({
'device-icon': true,
'exit-icon': true,
'exit-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.selectedIconName === SCREEN_SHARE_ICONTABNAME.EXIT,
})}
role="button"
tabIndex={0}
onClick={() => this.handleClickExit(SCREEN_SHARE_ICONTABNAME.EXIT)}
labeltooltip="退出桌面共享"
/>
.device-icon {
width: 24px;
height: 24px;
outline: none;
cursor: pointer;
margin-right: 11px;
position: relative; &:nth-last-child(2) {
margin-right: 24px;
}
} .camera-icon {
background: url('~ROOT/shared/assets/image/vn-screen-camera-off-66-66.png') no-repeat center;
background-size: 22px 22px; &.camera-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-camera-hover-69-66.png') no-repeat center;
background-size: 23px 22px;
}
} .mic-icon {
background: url('~ROOT/shared/assets/image/vn-screen-voice-on-54-72.png') no-repeat center;
background-size: 18px 24px; &.mic-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-mic-hover-54-72.png') no-repeat center;
background-size: 18px 24px;
}
} .speaker-icon {
background: url('~ROOT/shared/assets/image/vn-screen-speaker-60-66.png') no-repeat center;
background-size: 20px 22px;
} .wifi-icon {
background: url('~ROOT/shared/assets/image/vn-screen-wifi-72-57.png') no-repeat center;
background-size: 24px 19px; &.wifi-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-wifi-72-72.png') no-repeat center;
background-size: 24px 24px;
}
} .restart-icon {
background: url('~ROOT/shared/assets/image/vn-screen-restart-60-60.png') no-repeat center;
background-size: 19px 19px;
} .exit-icon {
background: url('~ROOT/shared/assets/image/vn-screen-exit-60-60.png') no-repeat center;
background-size: 19px 19px; &.exit-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 95px;
left: -35px;
}
} &.active{
background: url('~ROOT/shared/assets/image/screen-exit-blue-60-60.png') no-repeat center;
background-size: 19px 19px;
}
}

react项目中实现悬浮(hover)在按钮上时在旁边显示提示的更多相关文章

  1. WPF中当鼠标移到按钮上时,按钮的背景图片消失的问题

    如果给按钮设置了背景图片,当鼠标移到按钮上的时候,按钮就好变成一个浅蓝色的按钮,背景图片就消失了,对于这个问题有很多解决方法,我只分享一下我的解决方法. 我第一次用的方式是在按钮中添加一个图片,不用背 ...

  2. iOS 让按钮上的标题换行显示

    项目中遇到了要让按钮上的文字换行显示的需求,就写了这个博客. 1.如果按钮上的文字固定,形式是写死的,可以考虑给标题文字加\n换行符来达到效果,但是,记得一定要设置这个属性,不然是不会换行的, but ...

  3. React项目中实现右键自定义菜单

    最近在react项目中需要实现一个,右键自定义菜单功能.找了找发现纯react项目里没有什么工具可以实现这样的功能,所以在网上搜了搜相关资料.下面我会附上完整的组件代码. (注:以下代码非本人原创,具 ...

  4. 如何在非 React 项目中使用 Redux

    本文作者:胡子大哈 原文链接:https://scriptoj.com/topic/178/如何在非-react-项目中使用-redux 转载请注明出处,保留原文链接和作者信息. 目录 1.前言 2. ...

  5. 如何优雅地在React项目中使用Redux

    前言 或许你当前的项目还没有到应用Redux的程度,但提前了解一下也没有坏处,本文不会安利大家使用Redux 概念 首先我们会用到哪些框架和工具呢? React UI框架 Redux 状态管理工具,与 ...

  6. react项目中实现元素的拖动和缩放实例

    在react项目中实现此功能可借助 react-rnd 库,文档地址:https://github.com/bokuweb/react-rnd#Screenshot .下面是实例运用: import ...

  7. React项目中使用Mobx状态管理(二)

    并上一节使用的是普通的数据状态管理,不过官方推荐使用装饰器模式,而在默认的react项目中是不支持装饰器的,需要手动启用. 官方参考 一.添加配置 官方提供了四种方法, 方法一.使用TypeScrip ...

  8. 在react项目中使用ECharts

    这里我们要在自己搭建的react项目中使用ECharts,我们可以在ECharts官网上看到有一种方式是在 webpack 中使用 ECharts,我们需要的就是这种方法. 我们在使用ECharts之 ...

  9. 优雅的在React项目中使用Redux

    概念 首先我们会用到哪些框架和工具呢? React UI框架 Redux 状态管理工具,与React没有任何关系,其他UI框架也可以使用Redux react-redux React插件,作用:方便在 ...

随机推荐

  1. 【Idea】-NO.162.Idea.1 -【Idea Unable to import maven project: See logs for details】

    Style:Mac Series:Java Since:2018-09-10 End:2018-09-10 Total Hours:1 Degree Of Diffculty:5 Degree Of ...

  2. encodeURIComponent 和 decodeURIComponent 对字符串url编码 用于url拼字符传值

  3. (.NET高级课程笔记)Lambd、Linq总结

    知识总结 1.委托简介:委托是一种类型,可以写在类里,也可以写在类外面,级别和类一样高. 2.匿名方法.匿名类 3.Lambda表达式:goes to 4.系统自带委托:Func/Action 5.扩 ...

  4. js大图轮播和倒计时

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. XML文件的读取

    <?xml version="1.0" encoding="gbk"?> <!--设置编码格式为gbk--> <!DOCTYPE ...

  6. bochs模拟器创建映像文件 、写入文件并启动

    安装 bochs,dd for windows,nasm,并将安装目录加入到环境变量中. 我用的bochs版本是2.6.8 1.用 bochs 中 bximage.exe 创建新的 img 文件 2. ...

  7. linux svn安装 及 常用命令

    安装 yum -y install subversion svnserve --version 显示版本信息,则表示安装成功 mkdir /home/svn 创建版本库目录 svnadmin crea ...

  8. C# 实现http不同方法的请求

    p{ text-align:center; } blockquote > p > span{ text-align:center; font-size: 18px; color: #ff0 ...

  9. nginx ../logs/nginx.pid" failed (2: No such file or directory)

    [1]nginx.pid相关 (1)可能出现两种场景: 1.1 nginx.pid文件不存在 发生现象:nginx: [error] open() "/usr/local/lib/ubcsr ...

  10. SQL Server实现远程访问

    1.打开SQL Server 配置管理器(SQL Server Configuration Manager) 2.启用SQL Server网络配置的TCP/IP:选中左侧的「SQL Server网络配 ...