PDA

View Full Version : سوال: ایجاد گرادینت برای متن سازگار با همه ی مرورگر ها



ravand
پنج شنبه 22 بهمن 1394, 19:59 عصر
سلام
من میخوام به متن گرادینت بدم طوری که با همه ی مرورگر ها سازگار باشه.

h1 {
font-size: 72px;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}



با کروم فقط سازگاره با دیگر مرورگر ها سازگار نیست.
متشکرم.

پیام حیاتی
جمعه 23 بهمن 1394, 20:48 عصر
سلام
این پیش کدها رو هم اضافه کن :


-moz
-o
-ms

ravand
یک شنبه 25 بهمن 1394, 08:21 صبح
نمیدونم چرا هر چی پست ارسال میکنم پاک میشه!
منظور شما این روش هست؟


h1 {
font-size: 72px;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;

background: -moz-linear-gradient(#eee, #333);
-moz-background-clip: text;
-moz-text-fill-color: transparent;

background: -o-linear-gradient(#eee, #333);
-o-background-clip: text;
-o-text-fill-color: transparent;

background: -ms-linear-gradient(#eee, #333);
-ms-background-clip: text;
-ms-text-fill-color: transparent;
}

من اینو تست کردم ولی فقط با کروم سازگاره.

ravand
چهارشنبه 28 بهمن 1394, 13:05 عصر
این روش با همه ی مرورگر ها سازگار بود:
http://stackoverflow.com/questions/8005447/cross-browser-text-gradient-in-pure-css-without-using-background-image