简体   繁体   English

CSS无法在Chrome中运行,但在Firefox中运行

[英]CSS not working in Chrome but does in Firefox

I have a textarea that I am using for suggestions. 我有一个textarea,我正在使用建议。 Below is two screenshots; 以下是两个截图; one in Firefox and one in Chrome. 一个在Firefox中,一个在Chrome中。 The Firefox one is right, I'm not sure why it is not showing right in Chrome. Firefox是正确的,我不确定为什么它没有在Chrome中显示。 Can anyone explain why this is happening? 任何人都可以解释为什么会这样吗? It works in Chrome locally, but not when I publish to Azure. 它在本地Chrome中运行,但在我发布到Azure时则不行。

Suggestion Box FireFox 意见箱FireFox

Suggestion Box Chrome 意见箱Chrome

My Style is: 我的风格是:

#txtSuggestion {
    position: relative;
    font-size: 16px;
    height: auto;
    padding: 10px;   
    -webkit-box-sizing: border-box; 
    -moz-box-sizing: border-box; 
    box-sizing: border-box;  
    width: 500px;
    height: 100px;
    border: 3px solid #cccccc;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

My div on page is: 我在页面上的div是:

<div id="suggestion">
    <h2 style="text-align:center;">Suggestion</h2>
    <h3 style="text-align: center;" id="successText"></h3>
    <textarea id="txtSuggestion"  spellcheck="false">   </textarea>        
    <div style="text-align:center; padding-top: 20px;">
        <span class="btn btn-sm btn-success" id="btnSubmit" onclick="SuggestionSubmit();">Submit</span>
    </div>
</div>

按Shift + F5尝试强制在chrome中刷新缓存

I copied your code and i see it exactly as you see in Firefox. 我复制了你的代码,我完全按照你在Firefox中看到的那样看到它。

Maybe press F5 to refresh the page, or open in a new Chrome window. 也许按F5刷新页面,或在新的Chrome窗口中打开。

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM