Notification texts go here Contact Us Buy Now!

[BLOGGER] Share Code DOWNLOAD With .Zip File On Blogspot Very Beautiful

[BLOGGER] Share Code DOWNLOAD With .Zip File On Blogspot Very Beautiful
Hi mọi người, ngày chủ nhật lang thang trên internet để xem một ích tài liệu liên quan, ai ngờ thấy có bài viết chia sẽ thủ thuật tạo button download cũng đẹp mắt cho người dùng internet.

Phía trên là hình ảnh demo của thủ thuật này. Các bạn cảm thấy thế nào, mình thấy cũng chất chơi thật đó :D.

HƯỚNG DẪN CÁCH THỰC HIỆN.

Bước 1: Các bạn truy cập vào trang quản trị của bạn tiếp đó vào phần "CHỦ ĐỀ", mủi tên đỗ xuống bạn chọn chỉnh sữa HTML.
Bước 2: Các bạn copy toàn bộ CSS ở phía bên dưới bỏ vào trước thẻ đống "</body>"
 <style type='text/css'>
	.codepro-icon{flex-shrink:0;display:inline-block;margin-right:12px;width:18px;height:18px;background-size:cover;background-repeat:no-repeat;background-position:center}.codepro-icon.codepro-download{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'><path d='M3 17v3a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-3'/><polyline points='8 12 12 16 16 12'/><line x1='12' x2='12' y1='2' y2='16'/></svg>")}.codepro-downloadInfo{max-width:500px;background-color:#fefefe;box-shadow:0 10px 8px -8px rgb(0 0 0 / 12%);border:1px solid #eceff1;border-radius:6px;padding:15px;margin-top:20px;margin-bottom:20px;display:flex;align-items:center;line-height:1.8em;font-size:14px}.codepro-downloadInfo a,.codepro-downloadInfo .codepro-fileType{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:10px;background:#f1f1f0;border-radius:10px}.codepro-downloadInfo a{background-color:#1e1e1e;color:#fefefe;margin:0;padding:10px 12px;border-radius:3px;width:auto;height:auto;line-height:20px;font-size:13px;text-decoration:none}.codepro-downloadInfo a:after{content:attr(aria-label)}.codepro-downloadInfo .codepro-fileType:before{content:attr(data-text)}.codepro-downloadInfo .codepro-fileName{flex-grow:1;width:calc(100% - 150px);padding:0 15px}.codepro-downloadInfo .codepro-fileName > *{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codepro-downloadInfo .codepro-fileSize{line-height:1.4em;font-size:12px;opacity:.8}.darkMode .codepro-downloadInfo{background-color:#2d2d30;border:0}.darkMode .codepro-downloadInfo .codepro-fileType{background-color:#1e1e1e}@media screen and (max-width:480px){.codepro-downloadInfo{padding:12px}.codepro-downloadInfo a{width:50px;height:50px;border-radius:10px}.codepro-downloadInfo a:after{display:none}.codepro-downloadInfo a .codepro-icon{margin:0}}
  </style>    

Và sau đó bạn lưu lại toàn bộ giao diện.
Bước 3: Khi các bạn vào bài đăng trên blog, bạn sữ dụng mã code sau để nó hiển thị nơi bạn muốn trong bài viết.
<div class='codepro-downloadInfo'>
    <span class='codepro-fileType' data-text='zip'></span>
    <div class='codepro-fileName'>
        <span>codepro.zip</span>
        <span class='codepro-fileSize'>1000GB</span>
    </div>
    <a aria-label='Download' href='#link'><i class='codepro-icon codepro-download'></i></a>
</div>

DEMO TẠI ĐÂY.
codepro.zip 1000GB

Lời kết: Như vậy bạn đã hoàn thành thủ thuật này rồi, và các bạn tùy biến màu sắc và khung theo khả năng của bản thân nhé, như vậy đoạn code trên sẽ tạo cho blog của bạn có một nút download đẹp và hiển thị rỏ thông tin chương trình được tải về.

About the Author

Chia sẽ kiến thức và tư duy sáng tạo của bản thân mỗi ngày cho cộng đồng IT Việt Nam và Thế giới. Chia sẽ thủ thuật lập trình Csharp, Visual Basic, Python, Php, Javascript, Css, Html. Tối ưu hóa Windows, Microsoft, Facebook, Youtube, Chrome...v.v. …

5 comments

  1. đẹp đó e, a đang tìm :D
    1. (y) áp dụng cho blog a nhé.
  2. đẹp đó c <3
  3. Code này chất lượng nè
  4. Good men
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
NextGen Digital Welcome to WhatsApp chat
Howdy! How can we help you today?
Type here...