react-component / banner-anim

Animate Banner React Component
http://react-component.github.io/banner-anim/
MIT License
170 stars 32 forks source link

当我设置背景图宽高后 为什么只显示图片 不显示文字呢 这是什么原因? #12

Closed qufei1993 closed 6 years ago

qufei1993 commented 7 years ago

<BgElement
                                key="bg"
                                className="bg"
                                style={{
                                backgroundImage: 'url(http://127.0.0.1:3000/uploads/demo.jpg)',
                                backgroundSize: '100% 100%',
                                width: '100%',
                                height: '400px'
                                }}/>
                                <QueueAnim name="QueueAnim" style={{index: 9999}}>
                                    <h1 key="h1">Ant Motion Demo</h1>
                                    <p key="p">Ant Motion Demo.Ant Motion Demo.Ant Motion Demo.Ant Motion Demo</p>
                                </QueueAnim>
                                <TweenOne animation={{ y: 50, opacity: 0, type: 'from', delay: 200 }} name="TweenOne1">
                                    Ant Motion Demo.Ant Motion Demo
                                </TweenOne>
jljsj33 commented 7 years ago

key 请不要忘写了。。。

qufei1993 commented 7 years ago

应该不是这个问题,官网的例子 我尝试这把他的key去掉照常可以显示的

<QueueAnim name="QueueAnim">
                            <h1 >Ant Motion Demo</h1>
                            <p >Ant Motion Demo.Ant Motion Demo.Ant Motion Demo.Ant Motion Demo</p>
                        </QueueAnim>
                        <TweenOne animation={{ y: 50, opacity: 0, type: 'from', delay: 200 }} name="TweenOne1">
                            Ant Motion Demo.Ant Motion Demo
                        </TweenOne>
jljsj33 commented 7 years ago

麻烦重现下....https://codepen.io/jljsj33/pen/WOQdjB

LiangTiger commented 6 years ago

问题怎么解决的?

jljsj33 commented 6 years ago

@LiangTiger 你也是这问题???能提供下重现吗???上面链接。。。这个关掉是长时间没反应。。。