【Ext JS】【FAQ】alert彈出框的標題始終不能靠左問題——原因是body的css中配置了text-align:center

來源:互聯網
上載者:User

【Ext JS】【FAQ】alert彈出框的標題始終不能靠左問題——原因是body的css中配置了text-align:center


1. 問題現象




2.  問題解決方案

修改前:

<style type="text/css">body {background-color: rgb(255,255,255); background-repeat:no-repeat;background-image: url("../images/login1.png");background-position:center;background-attachment:fixed;text-align: center;}

將text-align:center行刪除即可,這時就可看到標題是靠左顯示的。

修改後:

<style type="text/css">body {background-color: rgb(255,255,255); background-repeat:no-repeat;background-image: url("../images/login1.png");background-position:center;background-attachment:fixed;}

重新點擊login,彈出框顯示恢複正常了。



3. 原因分析


通過這種修改方式解決,可以猜測,應該是body的css改變了整個extjs的布局方式。

以後修改樣式的時候需要多加註意了。一不小心可能會影響到ext js的控制項顯示。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.