<% provide(:title, @user.name) %>
<div class="row">
<aside class="col-md-4">
<section class="user_info">
<h1>
<%= gravatar_for @user %>
<%= @user.name %>
</h1>
</section>
</aside>
</div>
내 .html.erb는 위에 다음과 같이 주어졌습니다. h1 태그 아래에서 @ user.name 변수의 스타일을 지정하려고했지만 그렇게 할 수 없습니다. 요소를 검사 할 때 h1 태그 아래의 모든 스타일을 직접 지정할 수 있지만 실제 CSS 파일로 시도하는 것은 운이 없습니다.
aside {
h1 {
font-size: 1.4em;
text-align: left;
letter-spacing: -1px;
margin-bottom: 3px;
margin-top: 0px;
}
}
지금 확인하세요.
aside h1{
font-size: 1.4em;
text-align: left;
letter-spacing: -1px;
margin-bottom: 3px;
margin-top: 0px;
}
<div class="row">
<aside class="col-md-4">
<section class="user_info">
<h1>
Header
</h1>
</section>
</aside>
</div>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다