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
Html 按钮在页面加载时显示在上面_Html_Css - Fatal编程技术网

Html 按钮在页面加载时显示在上面

Html 按钮在页面加载时显示在上面,html,css,Html,Css,如果我们访问此页面,在加载时,“添加到购物车”按钮将显示上图中的位 一旦页面完全加载,它将显示在适当的位置 .label { color: #000; display: inline-block; font-family: 'Roboto Condensed', sans-serif; font-size: 14px; font-weight: normal; } .product-view .add-to-cart .qty-wrapper labe

如果我们访问此页面,在加载时,“添加到购物车”按钮将显示上图中的位

一旦页面完全加载,它将显示在适当的位置

.label {
    color: #000;
    display: inline-block;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    font-weight: normal;
}

.product-view .add-to-cart .qty-wrapper label {
    line-height: 40px;
}

.qty-wrapper, .product-view .add-to-cart .qty-wrapper label {
    margin-right: 7px;
    float: left;
}

.product-view .add-to-cart-buttons {
    float: left;
    margin-right: 10px;
    max-width: 100%;
}

但在页面加载时,我也希望在适当的位置显示

.label {
    color: #000;
    display: inline-block;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    font-weight: normal;
}

.product-view .add-to-cart .qty-wrapper label {
    line-height: 40px;
}

.qty-wrapper, .product-view .add-to-cart .qty-wrapper label {
    margin-right: 7px;
    float: left;
}

.product-view .add-to-cart-buttons {
    float: left;
    margin-right: 10px;
    max-width: 100%;
}

你网页的源代码伤了我的眼睛


在加载完所有js文件后,请将CSS移到
下方,尝试调整页面大小@3rdthemagical我猜在小屏幕设备或监视器中,它会显示为这样,因为它没有响应,似乎需要做很多修改来修复,对吗?您在许多div中使用了position:relative,你不应该那样做!您创建的布局看起来不太好。您应该使用float来获得更好的布局。移除那些位置!要解决您的问题,您应该从页面中删除所有未使用的代码。Html应该是干净的。现在很难在html中找到一些东西。@TeutaKoraqi是我需要使用
绝对值
来代替它吗?我们没有使用
,我从您的回答中了解到,代码级别处于最差状态。有没有可能为我的问题找到解决方案,我在问题中发布了“你页面的源代码伤害了我的眼睛!”-你完全正确!我们做了一些更改,请检查代码质量。