I can’t test it on safari/mac but Safari and Google Chrome uses WebKit rendering engine so it is very likely that every hack works in Safari. Google Chrome is rather new player but it rapidly increases and there is a need for using specific styles only for that browser. Thats why i am looking for hack for Google Chrome.
Nội dung bài viết
Hack 1: @media and -webkit-min-device-pixel-ratio
Testsuite: This text is red in Google Chrome.
This hack uses webkit specific feature.
/* will be red only in google chrome */ #test1{color:green;} @media screen and (-webkit-min-device-pixel-ratio:0) { #test1{color:red;} }
Hack 2: For Google Chrome and Opera<10
Testsuite: This text is red in Opera<10 and Google Chrome.
All hacks with brackets i found testing lot of css in google chrome and other browsers so if you are blogging about it please give link to this site or to mynthon.net. This hack uses bracket hack. When you open bracket only Google Chrome and Opera will stop processing this line on semicolon. Other browsers will ignore any code after opened bracket until closing bracket will be found. It is important to close bracket or any code after opening bracket will be ignored. It is also important to put semicolon (;) at the end of first line of the hack!
/* will be red only in opera and google chrome */ #test2{ color:green; -bracket-:hack(; color:red; ); }
Hack 3: For Google Chrome
Testsuite: This text is red in Google Chrome.
This hack is similar to “Hack 2” but it works only in Google Chrome. You have to start line with round bracket to make it work.
/* will be red only in google chrome */ #test3{ color:green; (-bracket-:hack; color:red; ); }
Hack 4: For Google Chrome
Testsuite: This text is red in Google Chrome.
This hack is similar to “Hack 2” but it works only in Google Chrome. If you replace round brackets with square brackets this hack will work only in Google Chrome.
/* will be red only in google chrome */ #test4{ color:green; -bracket-:hack[; color:red; ]; }
Tin tức nổi bật
Thiết kế web theo mẫu
Thiết kế web theo mẫu là gì? Thiết kế web theo mẫu là dịch vụ website được xây dựng...
Tổng hợp 20+ cách kiếm tiền từ website trong năm 2020
Thời kỳ 4.0, Internet trở thành một phần không thể thiếu trong cuộc sống của chúng ta. Người...
10 bước xây dựng kế hoạch marketing online
Thị trường luôn thay đổi và chính vì thế các chiến lược marketing online của bạn cũng cần...
Ý tưởng đặt tên thương hiệu – Cách chọn tên miền website – Lời khuyên vàng từ ITC Việt
Cách chọn tên miền website. Chúng tôi là ITC Việt. Chúng tôi là công ty thiết kế website...
Thiết kế website theo yêu cầu
Hiện nay Dịch vụ Thiết kế website theo yêu cầu đã không còn xa lạ đối với các doanh...
Thiết kế trang web, lập trang web, dựng trang web bán hàng
Nội dung bài viết Thiết kế trang web Thiết kế trang web là điều mà các công...
E-commerce là gì? E-business là gì? So sánh E-commerce và E-business
E-Commerce (tiếng Việt là thương mại điện tử) đang là một trong những vấn đề đáng quan tâm của...
Để thiết kế web đẹp bạn không thể bỏ qua 8 lưu ý sau
Việc thiết kế web ngày nay không còn dừng lại ở việc cung cấp thông tin đủ hay...