กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


Add Images to Category Strips per Category ID

วิธีการทํา Add Images to Category Strips per Category ID

  • ผู้เริ่มหัวข้อ ผู้เริ่มหัวข้อ thxf.org 
  • วันที่เริ่มต้น วันที่เริ่มต้น

thxf.org 

Administrator

สมาชิกทีมงาน
Admin
นี่เป็นเพียงรหัสเล็ก ๆ ที่จะเพิ่มในแม่แบบพิเศษของคุณ ซึ่งช่วยให้คุณเพิ่มภาพต่อ ID หมวดหมู่ สิ่งที่คุณต้องทำคืออัปโหลดภาพของคุณเองไปยังเซิร์ฟเวอร์ของคุณและเพิ่มเส้นทางรูปภาพหรือลิงค์ URL ภาพไปยังรหัสพร้อมกับรหัสหมวดหมู่ของคุณคุณกำลังเพิ่มภาพไปโดยแทนที่ X

สิ่งนี้ได้รับการทดสอบเฉพาะสไตล์เริ่มต้นบนพีซี, iPhone 5,6,7, iPad 3,4 และ PS4
ทดสอบเบราว์เซอร์: Mozilla Firefox, Google Chrome, Opera, Microsoft Edge, Safari

ความกว้างของภาพที่แนะนำจะไม่เล็กกว่า 800px

คุณสามารถเปลี่ยนความสูงของหมวดหมู่ขนาดของชื่อประเภทสีของตัวอักษรสำหรับชื่อเรื่องและคำอธิบายอื่น ๆ

อย่าลืมเปลี่ยนสี ฯลฯ ตามที่คุณชอบและฉันหวังว่านี่จะเหมาะกับคุณ.

This first code is just the basic add image code. See second code below if you want to go right out.
โค้ด:
/* Categories Images and Title */
.block--categoryX .block-header {
background: blue url("../images/cover-image.jpg") no-repeat center / cover;
color: #FFF;
overflow: hidden;
}
/**********/
/* Categories Title Hover */
.block--categoryX .block-header a:hover {
color: #FFF;
text-decoration: none;
opacity: .7;
}
/**********/
/* Categories Descriptions */
.block--categoryX .block-desc {
color: #000;
}
/**********/
/* Categories Images and Title Responsive */
@media (max-width: @xf-responsiveMedium)
{
.block--categoryX .block-header {
max-height: inherit;
}
}
/**********/
Screenshot Basic.

xfcatfunpcdefault-jpg.webp
This optional code is to have fun and mess around with. Remove the above code if using this one!
โค้ด:
/* Categories Images and Title */
.block--categoryX .block-header {
background: blue url("../images/cover-image.jpg") no-repeat center / cover;
max-height: 60px;
text-transform:;
font-weight: bold;
font-size: 20px;
font-family: cursive;
color: #FFF;
text-shadow: black 0.1em 0.1em 0.2em;
overflow: hidden;
}
/**********/
/* Categories Title Hover */
.block--categoryX .block-header a:hover {
color: #FFF;
text-decoration: none;
opacity: .7;
}
/**********/
/* Categories Descriptions */
.block--categoryX .block-desc {
color: #000;
text-transform:;
font-family: monospace;
text-shadow:
-1px -1px 0 #FFF,
1px -1px 0 #FFF,
-1px 1px 0 #FFF,
1px 1px 0 #FFF;
}
/**********/
/* Categories Images and Title Responsive */
@media (max-width: @xf-responsiveMedium)
{
.block--categoryX .block-header {
max-height: inherit;
}
}
/**********/
If you want to hide Categories Descriptions on forum list only, add this code to your extra.less
Code:
/* Hide Categories Descriptions */
.block--categoryX .block-desc {
display: none;
}
/**********/
Screenshots PC and Mobile.
xfcatfunm-jpg.webp

xfcatfunpc-jpg.webp

credit :
 

ไฟล์แนบ

  • xfcatfunpcdefault-jpg.webp
    xfcatfunpcdefault-jpg.webp
    12.4 กิโลไบต์ · จำนวนการดู: 216
  • xfcatfunm-jpg.webp
    xfcatfunm-jpg.webp
    18.1 กิโลไบต์ · จำนวนการดู: 222
  • xfcatfunpc-jpg.webp
    xfcatfunpc-jpg.webp
    20.3 กิโลไบต์ · จำนวนการดู: 214

กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see
กลับ
ยอดนิยม ด้านล่าง