2012-05-07 4 views
-1

노란색 배경을 가지고 굵은 테스트를 변경합니다CSS는 내가 HTML 테스트를

<body> 
<div class="test">This is a <b>paragraph</b>.</div> 
</body> 

내 CSS :

.test 
{ 
color: #1F1FFF; 
} 

내가 어떻게 수행 굵은 텍스트 노란색 배경으로 강조 할 CSS로 할거야?

답변

1

당신은

.test b 
{ 
background-color:yellow; 
} 

사용하거나 인라인 스타일과 같은

<b style="background-color:yellow;">XYZ</b> 

Demo Here

1
<style> 
.test b 
{ 
    background-color:#FF0; 

} 
</style> 
<body> 
<div class="test">This is a <b>paragraph</b>.</div> 
</body> 
을 사용할 수 있습니다
0

그냥 당신의 필요에 따라 배경색을 변경하시기 바랍니다 또 하나의 CSS 속성

.test b { 
    background-color: yellow; 
    color: #FF0000; 
} 

를 추가합니다.