2014-11-01 79 views
0

應該顯示什麼:帶有圓角的邊框用邊元素完成。顯示內容:帶正確輪廓顏色的方框邊框;但是它們不是圓形的。圓角邊框不能用於HTML網站的CSS樣式表

當我添加背景色時:具有圓角的盒子出現在旁邊元素的常規方框中。

這是我的代碼,它與我正在嘗試做的事情有關。

 <section id="main"> 

     <aside> 
      <p>The Grand Junction Neonatal Intensive Care Unit offers comprehensive neonatal 
       diagnostic and treatment facilities for critically ill newborns. We're dedicated 
       to providing the highest quality care for all newborns, ranging from healthy 
       neonates to sick or premature newborns requiring close observation or intensive care. 
      </p> 
      <p>All of the neonatologists are board certified. We believe it's critical that our 
       clinicians learn about the latest advances in neonatal intensive care to 
       better serve the community of Grand Junction. 
      </p> 
     </aside> 
     </section> 

and now the styles: 

/* Aside Styles */ 

aside { 
    color: rgb(149, 91, 42); 
    float: right; 
    margin: 30px;  
    outline: 3px solid rgb(149, 91, 42); 
    width: 50%; 

    /* Rounded corners here. Not Working. Don't know why. Please give feedback. */ 
    -moz-border-radius: 30px; 
    -webkit-border-radius: 30px; 
    border-radius: 30px; 
} 

aside p { 
    font-size: 90%; 
    margin: 20px; 
} 
+0

http://jsfiddle.net/chipChocolate/Lfhhutp5/ – 2014-11-01 19:54:27

回答

4

使用border而不是outline。你近了!

參見:http://jsfiddle.net/wyxjtacg/

+0

你需要糾正你的鏈接...最後刪除斜線。 – Dominique 2014-11-01 19:58:13

+0

完成。謝謝! – 2014-11-01 19:59:32

0

嘗試添加邊框:1px的純黑色;而不是'大綱'。