我正在使用光滑的滑块,在这里我试图突出显示当前的滑块图像,并需要淡出剩余的滑块图像
预期的结果是
http://i66.tinypic.com/20znsx1.png
创建小提琴是小提琴链接
我添加了以下css来获得我的结果
.slick-current.slick-active.slick-center {
opacity:1;
}
.slick-slide {
opacity:0.5;
background: #000;
border-left:3px solid #fff;
border-right:3px solid #fff;
}
Run Code Online (Sandbox Code Playgroud)
不透明度正常,但左右图像是白色叠加而不是黑色,
我在父容器中有一个复选框,它有一个click事件,每当我尝试单击复选框时,父对象首先工作,然后是更改事件,我e.stopPropagation();在父事件和子事件上都使用,但是,它仍然不能正常工作
// make the .parent react
function grandParent(){
alert('Grand Parent: You hit me, my child or my grand child, now deal with me!');
}
// make the .parent react
$('.parent').on('click', function(e){
e.stopPropagation()
alert('Parent : Don\'t you dare hitting me or my child, again!');
});
// make the child cry, when we hit him.
$('.child').on('click', function(e){
e.stopPropagation();
alert('Child : waaaaaa waaaa waa huh huh waaa waaaa!');
});
$('.hello').on('change', function(e){
e.stopPropagation();
alert('checkbox clicked');
});
Run Code Online (Sandbox Code Playgroud)
我必须componentDidMount在屏幕 A 中列出一组文件(图像),从此屏幕 AI 有另一个屏幕 B 链接,我可以在其中查看文件的详细视图,并且可以选择删除文档。
当使用调用屏幕 A 时
<TouchableOpacity style={Styles.HomeButton} onPress={ () => this.props.navigation.navigate('Gallery')}>
<Text style={Styles.HomeButtonText}>View Photos</Text>
</TouchableOpacity>
Run Code Online (Sandbox Code Playgroud)
componentDidMount 工作正常,但是当我在取消链接回调中删除文件(我正在使用 react-native-fs)时,我正在调用导航
this.props.navigation.navigate('Gallery');
Run Code Online (Sandbox Code Playgroud)
重定向到屏幕 A 工作正常,但componentDidMount无法正常工作,这意味着我仍然可以在列表中看到已删除的文件。即屏幕 A 不刷新,有什么可能的解决方案吗?
我在swiper中有多个视频可以一个一个地显示视频,但是所有视频都是同时加载和播放的,而且音频很乱,我希望当前视频只能一次播放。
import * as React from 'react';
import { Text, View, StyleSheet,Image, Dimensions } from 'react-native';
import { Constants } from 'expo';
import { Video } from 'expo';
import Swiper from './Swiper';
import InViewPort from './InViewport';
const screenWidth = Dimensions.get('window').width ;
const screenHeight = Dimensions.get('window').height;
export default class App extends React.Component {
constructor(props) {
super(props);
// Your source data
this.state = {
images: {},
muted : false,
paused: true,
};
this.player = Array();
this.onChangeImage = this.onChangeImage.bind(this);
}
videoError(err){
console.warn(err);
} …Run Code Online (Sandbox Code Playgroud)