Targeting only the Dolphin Browser with CSS
What would be best way to target only Dolphin Browser with your CSS rules and not a single other browser?
Dolphin is browser on the Evo. Something like what targets Firefox:
@-moz-document url-pr开发者_运维知识库efix() {
h1 {
color: red;
}
}
Dolphin on Android and IOS has basically the EXACT same user agent string compared to Safari on IOS, or in the Android scenario, as the native Android browser on Android 2.X at least.
I personally think they did this deliberately haha
The way I think you could detect Dolphin is with:
Detect if "Safari" is in the UA, (sure it will still match IOS Safari and Native Android browser, but then check how high the header is, the Dolphin header is twice as tall and even has that anonying bar at the bottom.
I have never heard of this browser, but chances are that there are no CSS specific hacks to target it. You would have to detect it using the USER_AGENT
string (either on server side or in JavaScript) and serve the appropriate CSS rules.
Related:
How can I detect the browser version with JS?
What is better: CSS hacks or browser detection? not really related but good reading
Any php code to detect the browser with version and operating system?
精彩评论