Yeah with just HTML,CSS alone you cannot style differently for Safari, Chrome and Opera since all of the three uses the same flag -webkit- for styling using css
so the possible solutions is to Detect the browser using javascript and add a class to your body to indicate the browser
Eg. if you wanna style safari you will be styling
.safari .box:hover{
/* style as you need */
}
the test code i had run is attached below.
<html>
<head>
<title>TVEK Test App for srk</title>
</head>
<body>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script type="text/javascript">
$(function () {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent .indexOf('safari')!=-1){
if(userAgent .indexOf('chrome') > -1){
//browser is chrome
alert('chrome');
}else if((userAgent .indexOf('opera') > -1)||(userAgent .indexOf('opr') > -1)){
//browser is opera
alert('opera');
}else{
//browser is safari, add css
alert('safari');
$("body").addClass("safari");
}
}
});
</script>
<style type="text/css">
.safari .box{
/* add your required style here */
margin:20px;
}
.box:hover {
transform: scale(1.03);
-ms-transform: scale(1.03);
-webkit-transform: scale(1.03);
-webkit-transition: all .01s ease-in-out;
transition: all .01s ease-in-out;
}
div {
padding-left: 30px;
margin: 10px;
}
.box {
border: 1px solid black;
}
</style>
<div class="box">
<div>
<input type="checkbox" name="opt1" id="option1" /> hello
</div>
<div>
<select>
<option>apple</option>
<option>orange</option>
</select>
</div>
<div>
<input type="text" placeholder="enter something" />
</div>
</div>
</body>
</html>
Please credit the bounty if my solution is helpful
you can remove the alert if required. I just added the alert to show you the Proof-of-Evidence.