Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css Webkit上的溢出和圆形边框_Css_Webkit - Fatal编程技术网

Css Webkit上的溢出和圆形边框

Css Webkit上的溢出和圆形边框,css,webkit,Css,Webkit,我试图用一个隐藏的面板构建一个圆形区域,该面板在圆形内部向上滑动。这似乎在Firefox上运行得很好,但是在Chrome/Webkit上没有“屏蔽”。我假设这里面有某种CSS把戏,但到目前为止我的头一直撞在墙上 您可以使用径向渐变,这样您甚至不需要容器和支架- 相关CSS: #top { overflow: hidden; width: 300px; height: 300px; border-radius: 50%; } #slider { height

我试图用一个隐藏的面板构建一个圆形区域,该面板在圆形内部向上滑动。这似乎在Firefox上运行得很好,但是在Chrome/Webkit上没有“屏蔽”。我假设这里面有某种CSS把戏,但到目前为止我的头一直撞在墙上


您可以使用径向渐变,这样您甚至不需要容器和支架-

相关CSS:

#top {
    overflow: hidden;
    width: 300px;
    height: 300px;
    border-radius: 50%;
}
#slider {
    height: 600px;
    background: radial-gradient(circle, gainsboro 70.71%, transparent 70.71%) 
            no-repeat 0 100%;
    background-size: 300px 300px;
    transition: .3s;
}
#top:hover #slider {
    height: 300px;
}

我已经为滑块的
高度设置了动画,但是你也可以为
背景位置设置动画,我不确定Firefox是否正确。。。