twitter-bootstrap徽标位置(桌面+移动)不同位置

时间:2016-02-28 10:49:14

标签: html css twitter-bootstrap

感谢您的支持。我创建了一个litte引导页面。 我只有两个小问题。桌面浏览器上的徽标位置与移动设备(iphone)上的位置不同。

我发现如果你从容器流体 - padding-left:15px更改css代码“bootstrap.min.css”;填充左:0px;徽标将位于桌面浏览器上的正确位置,但移动设备上的错误位置。

sample image

你有什么想法来解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

您遇到此问题的原因是因为Twitter bootstrap使用media queries。媒体查询实质上允许css类或id具有针对不同屏幕宽度的不同样式。

要解决此问题,您可以进入并更改缩小代码中的每个媒体查询以满足您的要求。但是,更好的解决方案是将您自己的css写入一个超过bootstrap的单独文件中。

示例

所以这是一个带容器液的div

FormaPagamento

这是你的css将覆盖左边的填充。

public class FormaPagamento
{

        public FormaPagamento()
        {
            this.ContasPagarReceber = new HashSet<ContaPagarReceber>();
            this.Movimentacoes = new HashSet<ContaPagarReceberMovimentacao>();
            this.ComprasVendas = new HashSet<CompraVenda>();
            this.CondicoesPagamento = new HashSet<CondicaoPagamentoFormaPagamento>();
        }

        public long ID_FormaPagamento { get; set; }
        public string Descricao { get; set; }
        public bool IsAtivo { get; set; }
        public bool IsSystem { get; set; }
        public int? Enum { get; set; }

        public virtual ICollection<ContaPagarReceber> ContasPagarReceber { get; set; }
        public virtual ICollection<ContaPagarReceberMovimentacao> Movimentacoes { get; set; }

        // When I removed this collection, it works.
        public virtual ICollection<CompraVenda> ComprasVendas { get; set; }

        public virtual ICollection<CondicaoPagamentoFormaPagamento> CondicoesPagamento { get; set; }

}