<template>
<view style="flex: 1;">
<!-- 测试view的 hover-class -->
<view style="width: 200rpx;height: 100rpx;background-color: red;" hover-class="tab-css"></view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.tab-css{
opacity: 0.5;
}
</style>

- 发布:2021-09-09 15:08
- 更新:2021-09-10 11:22
- 阅读:695
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: w7
HBuilderX类型: 正式
HBuilderX版本号: 3.2.3
手机系统: iOS
手机系统版本号: IOS 14
手机厂商: 苹果
手机机型: 苹果X
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
<template>
<view style="flex: 1;">
<!-- 测试view的 hover-class -->
<view style="width: 200rpx;height: 100rpx;background-color: red;" hover-class="tab-css"></view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.tab-css{
opacity: 0.5;
}
</style>
<template>
<view style="flex: 1;">
<!-- 测试view的 hover-class -->
<view style="width: 200rpx;height: 100rpx;background-color: red;" hover-class="tab-css"></view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.tab-css{
opacity: 0.5;
}
</style>
预期结果:
希望能有效
希望能有效
实际结果:
无效
无效
bug描述:
view 的hover-class属性无效
阿Zone
还是不行诶
2022-01-21 10:11