Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
Html 调整窗口大小时影响框阴影的边距_Html_Css - Fatal编程技术网

Html 调整窗口大小时影响框阴影的边距

Html 调整窗口大小时影响框阴影的边距,html,css,Html,Css,我正在尝试使用长方体阴影来模拟边框。我不能四面八方使用边界,但我遇到了问题 input[type=text]{ float:left; font-family: verdana, arial, sans-serif; font-size: 13pt; height:40px; padding:0 80px 0 5px; width: 100%; border-width: 0 0 0 1px !important; -moz-box

我正在尝试使用长方体阴影来模拟边框。我不能四面八方使用边界,但我遇到了问题

input[type=text]{
    float:left;
    font-family: verdana, arial, sans-serif;
    font-size: 13pt;
    height:40px;
    padding:0 80px 0 5px;
    width: 100%;
    border-width: 0 0 0 1px !important;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow:hidden;
    box-shadow: -79px 0 0 #ffffff inset, -80px 0 0 0 #c5cbcf inset, 0 1px 0 0 #c5cbcf inset, 0 -1px 0 0 #c5cbcf inset;
}
我需要这样做,因为盒子的右边有东西。这显示的很好,但当我调整浏览器窗口的大小时,阴影会来来去去去。如果将宽度设置为2px,它们会一直保持不变,但会变宽变薄。如果我调整边距,它会在一个点上解决它,然后在不同的点上影响它


他们有办法解决这个问题吗?

你可以把我们链接到js fiddle或你的网站上,显示问题,为什么你在框阴影上使用负值?(-79px)使边界向右移动。对于右边的元素,我需要在元素开始之前使用-79获得边框,因此需要使用边框框,具有较大的右填充,并且不能使用普通边框。