IT Share you

IE8의 CSS 둥근 모서리

shareyou 2020. 12. 11. 20:52
반응형

IE8의 CSS 둥근 모서리


IE8에서 둥근 모서리에 문제가 있습니다. 성공하지 못한 채 몇 가지 방법을 시도했습니다.

내 코드는 다음과 같습니다.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>

<style>
body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8em;
  padding: 2px;
  margin: 2px;
  color: #505050;
  line-height: normal;
}
p {
  margin: 4px;
}
.categoryheading3 {
  -moz-border-radius-topleft: 5px;
  -moz-border-radius-topright: 5px;
  -webkit-border-top-left-radius: 5px;
  -webkit-border-top-right-radius: 5px;
  background-color: #297BB6;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0;
  text-align: center;
  margin: 0px;
}
.leftcolumn {
  width: 174px;
  padding: 8px;
  float: left;
  display: inline-block;
  background-color: transparent;
  /*--min-height: 500px*/
  overflow: hidden;
}
.lefttop {
  display: inline-block;
  width: inherit;
  margin: 0 5px 2em 0;
  float: left;
  width: 160px;
  background-color: #FFFFFF;
  border: 2px solid #297BB6;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}
</style>


</head>
<body>

<div class="leftcolumn">
  <div class="lefttop">
    <H4 class="categoryheading3">Heading</H4>
    <p>sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text </p>
  </div>
</div>
</body>
</html>

Firefox에서 다음을 생성합니다.

파이어 폭스 예제

그러나 이것은 IE8에서 :

IE8은 나를 슬프게한다

누군가 팁이 있으면 매우 감사하겠습니다!

편집 : Joseph은 pie.htc를 사용하도록 제안하여 도움을 주었지만 여전히이 요소가 작동하지 않는 문제로 어려움을 겪고 있습니다.

.categoryheading3 {
  -moz-border-radius: 5px 5px 0 0;
  -webkit-border-radius: 5px 5px 0 0;
  behavior: url(PIE.htc);
  background-color: #297BB6;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0;
  text-align: center;
  margin: 0px;
}

Internet Explorer (버전 9 이하)는 기본적으로 둥근 모서리를 지원하지 않습니다.

마술처럼 당신을 위해 추가 할 놀라운 스크립트가 있습니다 : CSS3 PIE .

나는 놀라운 결과와 함께 그것을 많이 사용했습니다.


IE8의 둥근 모서리

인터넷 익스플로러 8 (및 이전 버전) 하지 않는 둥근 모서리를 지원 하지만 거기에 당신이 고려할 수 있습니다 몇 가지 다른 솔루션 :

  • Use Rounded Corners Images instead (this generator is a good resource)

  • Use a jQuery Corner plugin from here

  • Use a very good script called CSS3 PIE from here (Pro's & Con's here)

  • Checkout CSS Juice from here

  • Another good script is IE-CSS3 from here

Even though CSS PIE is the most popular solution, I'm suggesting you to review all other solutions and choose what works best for your needs.

Hope it was useful. Good Luck!


I didnt know about css3pie.com, a very useful site after seeing this post:

But what after testing it out it didnt work for me either. However I found that wrapping it in the .PHP file worked fine. So instead of:

behavior: url(PIE.htc);

use this:

behavior: url(PIE.php);

I put mine in a folder called jquery, so mine was:

 behavior: url(jquery/PIE.php);

So goto their downloads or get it here:

http://css3pie.com/download-latest

And use their PHP file. Inside the PHP file it explains that some servers are not configured for proper .HTC usage. And that was the problem I had.

Try it! I did, it works. Hope this helps others out too.


http://fetchak.com/ie-css3/ works for IE 6+. Use this if css3pie doesn't work for you.


PIE.htc worked for me great (http://css3pie.com/), but with one issue:

You should write absolute path to PIE.htc. It hasn't worked for me when I used relative path.


As Internet Explorer doesn't natively support rounded corners. So a better cross-browser way to handle it would be to use rounded-corner images at the corners. Many famous websites use this approach.

웹에서 둥근 이미지 생성기를 찾을 수도 있습니다. 이러한 링크 중 하나는 http://www.generateit.net/rounded-corner/ 입니다 .

참고 URL : https://stackoverflow.com/questions/7077331/css-rounded-corners-in-ie8

반응형