如何在屏幕分辨率上調整字體大小因爲我希望文本在屏幕分辨率很小時不超過1行。例如:http://prntscr.com/2qa9ze在屏幕分辨率上調整字體大小
<div class="centerbreaking">
<section id="breaking-news">
<div id="breaking-news-main" class="shadow">
<div id="breaking-news-title">Lajmi i fundit</div>
<div id="<?php if ($mobile) { echo "breaking-news-inside-mobile"; } else { echo "breaking-news-inside"; } ?>">
<ul id="breaking-news-list">
<?php $i=0; foreach ($results as $result) : ?>
<li><label type="text" name="text<?php echo $i;?>"><?php echo htmlspecialchars($result['text'],ENT_NOQUOTES,'UTF-8');?></label></li>
<?php $i = $i+1;
endforeach;
?>
</ul>
</div>
</div>
<script>
$(function() {
$('#breaking-news-inside').vTicker();
});
</script>
</section>
</div>
我的CSS是:
#breaking-news-main { float:left; height:40px; margin:5px 0 0; width:100%; background-color:#96040D; color:#fff; text-transform:uppercase; font-weight:bold; }
#breaking-news-title { background: url("images/bn_title.png") no-repeat scroll 0 0 transparent;color: #000000;float: left;font-size: 12px;height: 40px;line-height: 40px;padding: 0 0 0 10px;text-transform: uppercase;width: 112px;z-index: 999;}
#breaking-news-title p {padding:15px 10px;}
.breaking-news-inside {float: left;height: 40px;line-height: 40px;margin: 0 0 0 5px;padding: 0;width: auto;}
#breaking-news-list {font-size:15px;}
您應該使用媒體查詢 –
以及如何使用媒體查詢? :(sry iam新 – SiL3nT