bootstrap.css웹 사이트에 맞게 수정해야합니다 . 직접 custom.css수정하는 대신 별도의 파일 을 만드는 것이 낫 습니다. 업데이트 bootstrap.css해야하는 이유 bootstrap.css는 모든 수정 사항을 다시 포함시키는 데 어려움을 겪을 것입니다. 이 스타일에 대한로드 시간을 희생 할 것이지만 재정의하는 몇 가지 스타일에는 무시할 수 있습니다.
앵커 / 클래스의 스타일을 제거bootstrap.css 하도록 대체하려면 어떻게해야 합니까? 예를 들어에 대한 모든 스타일 규칙을 제거하려는 경우 :legend
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: inherit;
color: #333333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}
에서 모든 것을 삭제할 수는 bootstrap.css있지만 CSS 재정의에 대한 모범 사례에 대한 이해가 정확하다면 대신 어떻게해야합니까?
분명히하기 위해, 모든 범례 스타일을 제거하고 부모의 CSS 값을 사용하고 싶습니다. Pranav의 답변을 결합하면 다음을 수행합니까?
legend {
display: inherit !important;
width: inherit !important;
padding: inherit !important;
margin-bottom: inherit !important;
font-size: inherit !important;
line-height: inherit !important;
color: inherit !important;
border: inherit !important;
border-bottom: inherit !important;
}
(나는 다음과 같은 것을 할 수있는 방법이 있기를 바랐습니다.)
legend {
clear: all;
}
#bootstrap-overrides수업을 하지 않습니까?