Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

解决组件内容里的元素触发layout后宽度在ie6、7下会变成100%的问题(推荐根据内容动态给element设宽度) #13

Closed
yukai44444 opened this issue Sep 6, 2012 · 3 comments
Labels

Comments

@yukai44444
Copy link

推荐根据内容动态给element设宽度,也能解决上一个issue,这个功能可以做一个开关,不想用的可以关掉

@popomore
Copy link
Member

popomore commented Sep 9, 2012

简单描述下场景

<div class="ui-select">
  <ul>
    <li class="ui-select-item"></li>
    <li class="ui-select-item"></li>
  </ul>
</div>

ui-select 为 position:absolute,当 ui-select-item 设置高度时会触发 hasLayout,宽度变为 100%。

例子:http://aralejs.org/select/examples/item-haslayout.html

popomore added a commit that referenced this issue Sep 9, 2012
@popomore
Copy link
Member

popomore commented Sep 9, 2012

解决方法是不设 height,用 padding 替代。

@popomore
Copy link
Member

给一个样式

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants