Bootstrap 3 responsive h1 tag

You can use this :
CSS :
h1{
     word-wrap: break-word;
     -webkit-hyphens: auto;
     -moz-hyphens: auto;
     -ms-hyphens: auto;
     -o-hyphens: auto;
     hyphens: auto;
}
Or if you want more browser compatibiliy you can sibling your h1 with id or class and reduce font-size with media query on < 768px
CSS :
@media screen and (max-width: 768px) {
    h1{
        font-size:14px;
    }
}
When your screen as less to 768px of width the property has running

==============================================================

I've had the same problem, which I've solved with jQuery:
function resize() {
    var n = $("body").width() / 17 + "pt";
    $("h1").css('fontSize', n);
}
$(window).on("resize", resize);
$(document).ready(resize);
The ratio can be adjusted by replacing the value 17 and it can be used for other tags by changing the h1.

Theo: https://stackoverflow.com/questions/25403510/bootstrap-3-responsive-h1-tag

Nhận xét

Bài đăng phổ biến từ blog này

Khôi phục phân vùng ổ cứng do ghost nhầm theo Hieuit.net

Cách sử dụng 2 phương thức [httppost] và [httpget] trong MVC theo https://dzungdt.wordpress.com

MVC định dạng tiền tệ vnđ - Format currency vnd in MVC