简体   繁体   中英

How can I get users to view published IIS page with css style?

I published a basic page with a css style in the body of the page to IIS. When I run the page in Visual Studio the css style loads fine but for some reason the css is not applied to the published page so the users don't see the css view. I went onto the IIS machine and loaded the page and it worked fine. Is there something that I need to specify on the IIS server to allow the css or something? The css is written in the page like below so there is no file associated with the css.

<style>
body{
margin:0;
overflow:hidden;
}
.wrapper{
transform: rotate(90deg);
transform-origin:bottom left;

position:absolute;
top:-100vw;

height:100vw;
width:100vh;

background-color:#000;
color:#fff;

overflow:auto;
}
</style>

Just figured it out.

I needed to add:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11" />

Because for some reason IE11 was shifting to compatibility mode to IE7. The above, enforces IE11 to not downgrade compatibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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