Hiển thị các bài đăng có nhãn Css scroll. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Css scroll. Hiển thị tất cả bài đăng

Chủ Nhật, 1 tháng 3, 2026

Scroll box + chỉnh item scroll + khi hover mới hiện



.scroll-box {
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #e6ecf2;
    padding: 20px 16px;
    width: 240px;
    max-height: 90vh;
    left: 20px;
    overflow-y: auto;
    padding: 10px 0 20px 12px;
    position: sticky;
    z-index: 99;
    top: 74px;
}
/* Thanh cuộn */
.scroll-box::-webkit-scrollbar {
    width: 4px;   /* chỉnh nhỏ lại ở đây */
}

/* Mặc định ẩn */
.scroll-box{
    scrollbar-width: none;
}

.scroll-box::-webkit-scrollbar {
    width: 0;
}

/* Hover mới hiện */
.scroll-box:hover::-webkit-scrollbar {
    width: 4px;
}

.scroll-box:hover {
    scrollbar-width: thin;
}

Thứ Ba, 29 tháng 10, 2024

Chi Tiết Sp Scroll Top

 

**** HTML

<div class="product-detail-head">

<div class="detail-theme-image">

<div class="inner-image">

    <div class="img ratio-1-1">

    <a data-fancybox="gallery'.$id.'" data-caption="'.$subject.'" href="url:images">

        <img src="url:images" class="img-fluid">

        </a>

    </div>

</div>

<div class="theme-bottom-image">

<div class="col-12 col-md-6">

<div class="item item-view-demo">

<a href="/view-demo/doanhnghiep03" class="btn btn-submit w-100" target="_blank">Xem thực tế</a>

</div>
</div>

<div class="col-12 col-md-6">

<div class="item item-registertrial"><button class="btn btn-submit-white w-100" nh-category-id="163" nh-template="doanhnghiep03" btn-registertrial="">Dùng thử</button>

</div>

</div>

<div class="clearfix"></div>

</div>

</div>

</div>

**** CSS

.product-detail-head {

    background: #fff;

    padding: 15px;

    box-shadow: 0 .3rem 1.525rem -.375rem rgba(0, 0, 0, .1);

    border-radius: 8px;

}

.detail-theme-image {

    position: relative;

}

.detail-theme-image .inner-image {

    border-radius: 8px;

    overflow: hidden;

}

.ratio-1-1 {

    padding-top: 100%;

    position: relative;

}

.img-fluid {

    max-width: 100%;

    height: auto;

}

.ratio-1-1 img{

position: absolute;

    top: 0;

    bottom: 0;

    left: 0;

    right: 0;

    height: 100%;

    width: 100%;

    object-fit: cover;

}


.detail-theme-image .inner-image .img:hover img {

    object-position: bottom;

}

.detail-theme-image .inner-image .img img {

    object-position: top;

    -webkit-transition: all 3s ease-in-out 0s;

    -moz-transition: all 3s ease-in-out 0s;

    -ms-transition: all 3s ease-in-out 0s;

    transition: all 3s ease-in-out 0s;

}



/*** 2 buttton******/


.btn {

    z-index: 0;

    border: 0;

}

.btn:not(:disabled):not(.disabled) {

    cursor: pointer;

}

.btn:hover {

    color: #fff !important;

}


.btn:not(.btn-registertrial) {

    position: relative;

    overflow: hidden;

}

.w-100 {

    width: 100% !important;

}

.btn {

    display: inline-block;

    font-weight: 400;

    color: #212529;

    text-align: center;

    vertical-align: middle;

    user-select: none;

    background-color: transparent;

    border: 1px solid transparent;

    padding: 0.85rem 1.25rem;

    font-size: 1.4rem;

    line-height: 1.5;

    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

}

.btn:not(.btn-registertrial):before {

    content: '';

    position: absolute;

    height: 100%;

    width: 0%;

    top: 0;

    left: -40px;

    transform: skewX(45deg);

    background: linear-gradient(90deg, #0D5DD6 0%, #9747FF 100%);

    z-index: -1;

    transition: all 1s;

}

.btn:not(.btn-registertrial):hover:before {

    width: 160%;

}

.btn:not(.btn-registertrial):before {

    content: '';

    position: absolute;

    height: 100%;

    width: 0%;

    top: 0;

    left: -40px;

    transform: skewX(45deg);

    background: linear-gradient(90deg, #0D5DD6 0%, #9747FF 100%);

    z-index: -1;

    transition: all 1s;

}

.btn-submit {

    border: 1px solid #0D5DD6;

    background-color: #0D5DD6;

    color: #fff;

    border-radius: .5rem;

}

.btn-submit-white {

    width: 100%;

    border: 1px solid #0D5DD6;

    color: #0D5DD6;

    border-radius: 0.5rem;

}

Thứ Hai, 30 tháng 9, 2024

Css Scroll

 

**** HTML

<div class="bodymodal>

         <div class="content">
              Content 1   
          </div>

          <div class="content">
           
  Content 2
          </div>  

</div>

****CSS

.bodymodal{

    width: 100%;

    clear: both;

    max-height: 320px;

    overflow-y: scroll;

    overflow-x: hidden;

    border-top: none;

}

.bodymodal::-webkit-scrollbar {

    background: #ffffff;

    width: 5px

}


.bodymodal ::-webkit-scrollbar-button {

    background: #fff

}


.bodymodal::-webkit-scrollbar-track {

    background: #ffffff;

    width: 5px

}


.bodymodal::-webkit-scrollbar-track-piece {

    background: #ebebeb;

    width: 5px

}


.bodymodal::-webkit-scrollbar-thumb {

    background: #ccc;

    width: 5px

}

Thứ Năm, 1 tháng 6, 2023

scroll bottom css

 

**** HTML

<div class="coupon-public">

    <div class="coupons">

        <div class="coupon">

            <div class="coupon-left"></div>

            

            <div class="coupon-right">

                <div class="coupon-title">

                    T523100K

                </div> 


                <div class="coupon-description">

                <span>Giảm 100K</span> 

                cho đơn hàng từ 799K (trừ Combo tiết kiệm, Giảm 50%)

                </div>

            </div>

        </div>


        <div class="coupon">

            <div class="coupon-left"></div>

            

            <div class="coupon-right">

                <div class="coupon-title">

                    T523100K

                </div> 


                <div class="coupon-description">

                <span>Giảm 100K</span> 

                cho đơn hàng từ 799K (trừ Combo tiết kiệm, Giảm 50%)

                </div>

            </div>

        </div>

        

    </div>

</div>

  

****CSS

.coupon-public{

    margin-top: calc(1.5rem - 10px)

}

.coupon-public .coupons {

    overflow-x: auto;

    overflow-y: hidden;

    display: flex;

    padding-bottom: 10px;

    padding-top: 10px;

    -webkit-overflow-scrolling: touch;

}

.coupon-public .coupons:hover {

}

.coupon-public .coupons::-webkit-scrollbar {

    height: 5px;

}

.coupon-public .coupons:hover::-webkit-scrollbar-thumb {

    background: #a9a9a9;

}

.coupon-public .coupons::-webkit-scrollbar-thumb {

    background: #fff;

    border-radius: 10px;

}

.coupon-public .coupons .coupon:hover {

    border: none;

    background-color: #2F5ACF;

    color: #fff;

}

.coupon-public .coupons .coupon:not(:last-child) {

    margin-right: 1rem;

}

.coupon-public .coupons .coupon {

    display: flex;

    border: 1px solid rgba(36, 36, 36, 0.3);

    border-radius: 8px;

    cursor: pointer;

    transition: all .2s;

    min-width: 284px;

    width: 284px;

}

.coupons .coupon:hover .coupon-right .coupon-description{

    color: #fff;

}

.coupon-left{

    flex: 1;

    border-right: 2px dashed #666666c2;

    min-width: 20px;

    max-width: 20px;

    position: relative;

    border-color: #fff;

}

.coupon-left:before {

    border: none;

    content: '';

    display: block;

    width: 1.3rem;

    height: 1.3rem;

    background: white;

    top: 50%;

    transform: translate(-50%, -50%) rotate(45deg);

    position: absolute;

    border-top: 1px solid rgba(36, 36, 36, 0.3);

    border-right: 1px solid rgba(36, 36, 36, 0.3);

    border-bottom: 1px solid #0000;

    border-left: 1px solid #0000;

    border-radius: 100em;

}   

.coupon-right{

    flex: 2;

    padding: 0.5rem 1rem 0.5rem 1rem;

    position: relative;

.coupon-title{

    font-size: 16px;

    font-weight: bold;

}

.coupon-count{

    font-weight: normal;

    font-size: 0.8em;

}

.coupon-description{

    font-size: 14px;

    color: #4d4d4d;

    display: block;

    min-width: 135px;

    transition: .2s all;

    line-height: 20px;

    margin-top: 4px;

    font-family: 'coollook';