نَجد
08-05-2026, 07:29 PM
-
صورة عمل الكود
ضع كود جافا و حدد الصفحه الرئيسية
إدارة أكواد جافا
الكود:
$(function () {
var n = 1;
$( '.linklist ~ .forabg' ).each(function() {
$(this).attr('id', 'cate'+n+'');
n++;
});
});
ثم سجل و انتقل الى ورقه css
و اضف الكود التالي
الكود:
.forabg { border-radius: 4px; }
#cate1.forabg li.header { background-color: #368AD2; border-radius: 3px 3px 0 0; }
#cate2.forabg li.header { background-color: #aaaaaa; border-radius: 3px 3px 0 0; }
#cate3.forabg li.header { background-color: #D31141; border-radius: 3px 3px 0 0; }
#cate4.forabg li.header { background-color: #00AA00; border-radius: 3px 3px 0 0; }
#cate5.forabg li.header { background-color: #dddddd; border-radius: 3px 3px 0 0; }
مع تغيير id الفئه
معرف الفئه الاولى = 1
cate1
الكود:
#cate1.forabg li.header { background-color: #dddddd; border-radius: 3px 3px 0 0; }
صورة عمل الكود
ضع كود جافا و حدد الصفحه الرئيسية
إدارة أكواد جافا
الكود:
$(function () {
var n = 1;
$( '.linklist ~ .forabg' ).each(function() {
$(this).attr('id', 'cate'+n+'');
n++;
});
});
ثم سجل و انتقل الى ورقه css
و اضف الكود التالي
الكود:
.forabg { border-radius: 4px; }
#cate1.forabg li.header { background-color: #368AD2; border-radius: 3px 3px 0 0; }
#cate2.forabg li.header { background-color: #aaaaaa; border-radius: 3px 3px 0 0; }
#cate3.forabg li.header { background-color: #D31141; border-radius: 3px 3px 0 0; }
#cate4.forabg li.header { background-color: #00AA00; border-radius: 3px 3px 0 0; }
#cate5.forabg li.header { background-color: #dddddd; border-radius: 3px 3px 0 0; }
مع تغيير id الفئه
معرف الفئه الاولى = 1
cate1
الكود:
#cate1.forabg li.header { background-color: #dddddd; border-radius: 3px 3px 0 0; }