<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. JDK8 Stream操作整理

    1,forEach this.quoteItemList.forEach(p -> p.setMode(mode)); 2,获取对话属性,去重后生成集合 List<String> p ...

  2. ionic3 生命周期 之 ionViewWillLeave 坑

    ionic3  生命周期 ionViewWillLeave,当页面关闭离开时 执行的事件, 从页面根部跳转 this.appCtrl.getRootNav().setRoot() 方法离开时是 不执行 ...

  3. Kafka笔记4(消费者)

    消费者和消费群组: Kafka消费者从属于消费者群组,一个群组里的消费者订阅的是同一个主题,每个消费者接收主题的一部分分区消息 消费者的数量不要超过主题分区的数量,多余的消费者只会被闲置 一个主题可以 ...

  4. Java多线程处理List数据

    实例1: 解决问题:如何让n个线程顺序遍历含有n个元素的List集合 import java.util.ArrayList; import java.util.List; import org.apa ...

  5. Cpython解释器GIL-多线程执行流程

  6. 深入理解javascript原型和闭包(转)

    深入理解javascript原型和闭包(完结)   说明: 该教程绕开了javascript的一些基本的语法知识,直接讲解javascript中最难理解的两个部分,也是和其他主流面向对象语言区别最大的 ...

  7. html5 css练习,弹性三栏布局

    *{    margin: 0;    padding: 0;} body,html{    width: 100%;    height: 100%;        font: bold 24px ...

  8. 畅捷通T+12.2升级时发生的错误及处理方法图解

    前言:最近处理一个客户单位的财务数据,需要从2004年的U820版本的数据升级到畅捷通T+12.2版本.经查,该升级先要将原数据升级到T6,再从T6升级到畅捷通T+12.2版本.U820升级到T6很简 ...

  9. Delphi中Move、CopyMemory操作

    字串转字节数组 一.CopyMemory var s:PAnsiChar; ary:TArray<Byte>; bt:Byte; begin s:='Form Delphi'; SetLe ...

  10. App 基本图片配置(I)

    UITabBarController 的底部Item图片设置 分为三种: imageName@1x.png 图片像素(30 * 30) imageName@2x.png 图片像素(60 * 60) i ...