Bootstrap3浮动按钮面板底部

 mobiledu2502939211 发布于 2023-01-26 22:13

Bootstrap 3:我试图将一个按钮中心浮动到面板页脚的中间.但是整个布局都是响应式的,所以我需要在屏幕尺寸调整大小时使用它,或者它仍然是正确的.我创建了一个bootply,我的尝试很接近,但是在屏幕调整大小时不会停留.谢谢,Nate

Bootply试用版

1 个回答
  • 这是你想要的吗?http://www.bootply.com/114327

    .relative {
        position: relative;
    }
    
    .absolute {
        position: absolute;
    }
    
    .bottom-btn {
        left: 50%;
        bottom: -17px; /* half of the button height */
        margin-left: -77px; /* half of the button width */
        /* instead of bottom and margin-left, you can use translateX as well. */
    }
    

    玩css position属性并margin用来获得准确的位置.看到.bottom-btn班级的评论.

    2023-01-26 22:32 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有