【问题标题】:How can I add margin-left and margin-right to an php-element [closed]如何将 margin-left 和 margin-right 添加到 php-element [关闭]
【发布时间】:2014-05-16 23:34:07
【问题描述】:

我想为这个元素添加一个左边距和右边距。有人可以帮我吗?

this.$list.css( 'width', 100 * this.itemsCount + '%' );

【问题讨论】:

    标签: php css margin


    【解决方案1】:

    我认为这应该是一个 jquery 问题,但是...

    css() 可以将对象作为参数,所以试试...

    this.$list.css({
      'width': 100 * this.itemsCount + '%',
      'margin-left': '10px',
      'margin-right': '10px'
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-02
      相关资源
      最近更新 更多