0
div内にヘッダーがあります。 divはブラウザでサイズ変更されますが、テキストは同じサイズのままで、サイズが適切に変更されません。DivとTextを合わせて、比率を維持します。
.header {
min-width:100%;
\t min-height:13%;
\t position: fixed;
\t margin:auto;
\t top: 0;
\t z-index: 1;
\t background: rgb(0, 0, 0);
\t background: rgba(0, 0, 0, 0.7);
}
.headerTitle {
\t left: 0;
\t width:100%;
\t height:100%;
\t position: absolute;
\t color:black;
\t font: bold 24px/45px Helvetica, Sans-Serif;
\t letter-spacing: -1px;
\t margin-left: 3%;
\t font-size: 500%;
}
<div id="homepageHeader" class="header">
\t \t <h1 id="homepageHeaderTitle" class="headerTitle">Text Here</h1>
\t \t <!-- insert menu buttons here -->
\t </div>
コメントを作成するには、SASS関数を使用した素晴らしい記事があります:https://css-tricks.com/between-the-lines/ –
ありがとうございます!それは私をたくさん助けます – Tom