2013-06-19 45 views
0

第一圖象我使用這個自動調整大小在CSS調整與CSS

.maincont img { 
    border: medium none; 
    padding: 5px; 
    width: 350px; 
    height: 450px; 
} 

但它調整在我的崗位的所有圖像。我想調整它僅適用於我的第一圖像等圖像保持不變。任何解決方案

+2

顯示HTML,請。 – cortex

回答

1

您可以嘗試first-child僞類:

.maincont img:first-child { 
    border: medium none; 
    padding: 5px; 
    width: 350px; 
    height: 450px; 
}