NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
Luôn đồng hành cùng bạn!
Chuyên: WEBDESIGN - HOSTING - DOMAIN - CCTV
Hotline: 0903 880 905 - 0931 435 998


Hiển thị các bài đăng có nhãn thiết kế website. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn thiết kế website. Hiển thị tất cả bài đăng
Cách Thêm Tiện Ích (Widget) Vào Vị Trí Bất Kỳ Trong Blogspot

Cách thêm tiện ích (widget) vào vị trí bất kỳ trong blogspot là một vấn đề khá khó khăn với những người làm web bằng blogspot mà không am hiểu về html hoặc là mất nhiều thời gian để tìm hiều. Để đáp ứng nhu cầu của người dung hôm nay  ThienMinhVuong sẽ hưỡng dẫn bạn cách dể dàng để thêm các tiện ích vào bất kỳ vị trí nào cho blogspot

Thường thì trong bố cục blogspot sẽ phân ra một số vị trí như header, footer, sidebar, main,...và các bạn có thể thêm widget vào vị trí bất kỳ bằng cách copy đoạn code bên dưới và đặt cho phù hợp
Đầu tiên chúng ta đăng nhập blogspot ==> Mẫu ==> Sau lưu (bước này nhằm mục đích lưu lại mẫu theme của bạn để tránh trường hợp làm sai không sửa được thì bạn có thể lấy lại theme này) ==> Chĩnh Sữa HTML

Cách thêm một tiện ích widget thông thườngỞ cách thêm tiện ích widget thông thường này thì khi thêm tiện ích sẽ xuất hiện toàn bộ web, từ trang chủ, bài viết, label ...


<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML99' locked='false' title='Bài Viết Xem Nhiều' type='HTML'>
<b:includable id='main'>

<b:if cond='data:title != ""'>
<div class='title-left'><data:title/></div>
</b:if>
<div class='box-left'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section>

Chú ý phần chữ màu đỏ là phần bạn cận thay đổi
Bài Viết Xem Nhiều là tiêu đề bạn đặt cho tiện ích

sidebar1, HTML99 Nếu bạn thêm số tiện ích lớn hơn 2 thì bạn phãi đặt tên cho những phần này là khác nhau
VD: tiện ích 1 là sidebar1, HTML99 thì tiện ích 2 là sidebar2, HTML100
HTML là tên của tiện ích
VD HTML là HTML/Javascript, nếu bạn muốn thêm nhãn thì thay Bằng Label. phần này hơi phức tạp nếu bạn mà làm không được thì cứ commen vào bên giới mình sẽ chỉ rỏ cho

Cách thêm tiện ích widget vào một vị trí bất kỳ trong blogspotỞ những cách sau đây là những cách chỉ thêm tiện ích vào một vị trí bất kỳ ví dụ như trang chủ hoặc là label, bài viết, trang...
1. Chỉ cho phép widget hiển thị ở trang chủ

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở trang chủ' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>

Để thêm bạn đầu tiên là phải xác định vị trí muốn thêm, như head, footer....(nếu không xác địch được thì sau khi thêm vào một vị trí cùng với các tiện ích có sẵn trên web (thêm vào đầu hoặc cuối các tiện ích có sẵn sau này cho dể chĩnh sữa) rồi bạn vào bố cụng để di chuyển đến nơi thích hợp)
sau khi xác định vị trí muốn thêm thì bạn hãy copy cã đoạn mã trên rồi dán vào

2. Chỉ cho phép widget hiển thị ở từng bài viết

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở từng bài viết' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>
Đây là thủ thuật nhằm thêm tiện ích trên toàn bộ các bài viết:

3. Chỉ cho phép widget hiển thị ở những trang nhất định:

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở trang nhất định' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "Link của bạn"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>
Đây là code thêm tiện ích vào một trang nhất định, bạn có thể xem demo tại link Danh Mục ở phần này ThienMinhVuong áp dụng vào tạo một danh mục các label trên một trang thay vì các label xuất hiện trên toàn ộ trang gây ra tốn nhiều khoảng trống của web.


4. Widget chỉ hiển thị trên các trang Label

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở trên các label' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.searchLabel'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>

5. Widget chỉ hiển thị trên các trang Static pages

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở static pages' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>

6. Widget hiển thị trên trang tìm kiếm

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở trang tìm kiếm' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.searchQuery>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>

7. Widget chỉ hiển thị tại trang lưu trữ

<b:section class='sidebar' id='sidebar1' preferred='yes'>
<b:widget id='HTML3' locked='false' title='Thêm tiện ích ở trang lưu trữ' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>
</b:section>

 


PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Hướng Dẫn Sticky Menu Khi Cuộn Xuống trong NukeViet CMS 4.xmở file layout/header_extended.tpl
tìm
 <nav>
<div class="container">
<div class="row">
[MENU_SITE]
</div>
</div>
</nav>

Và thay thế thành đoạn sau
<nav class="second-nav stickymenu" id="menusite"><div class="container"><div class="row"><div class="bg box-shadow wraper">[MENU_SITE]</div></div></div> </nav>
<script type="text/javascript"> $(function() { var sticky_navigation_offset_top = $('.stickymenu').offset().top; var sticky_navigation = function(){ var scroll_top = $(window).scrollTop(); if (scroll_top > sticky_navigation_offset_top) { $('.stickymenu').css({ 'position': 'fixed', 'z-index': 990,'top':0 }); } else { $('.stickymenu').css({ 'position': 'relative', 'width': '100%' }); } }; sticky_navigation(); $(window).scroll(function() { sticky_navigation(); }); }); </script> 

vào file default\css\style.css thêm css
.stickymenu { background: red; margin: 0 auto 0; width: 100%; }
 

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
1 số trang web bán hàng có nút gọi điện thoại rung lắc trông rất đẹp mắt? Bỗng nhiên, bạn nhận ra web của mình không có nút gọi điện như vậy? Ngay lập tức, bạn lên Google tìm kiếm cách tạo nút gọi điện rung lắc cho web và thấy bài viết này?

Bạn đã tìm đúng bài viết rồi đó! Bài viết này, mình sẽ hướng dẫn cho bạn cách tạo nút gọi rung lắc đẹp cho web. Nó sẽ giúp gây chú ý cho khách hàng và kích thích họ bấm vào nút gọi trên web của bạn hơn.

Với nút gọi này, khi khách hàng truy cập trên máy tính thì họ sẽ nhìn thấy số hotline và có thể tự bấm số để gọi cho bạn. Còn nếu khách truy cập bằng mobile thì họ chỉ cần click vào là gọi cho bạn được luôn.

OK. Dưới đây mình sẽ hướng dẫn bạn tạo nút gọi điện thoại cho web theo 2 cách. Đó là dùng code và dùng plugin.

Code chèn nút gọi điện rung lắc cho website
Đây là cách thứ nhất, dành cho bạn nào biết về code có thể dùng code HTML và CSS dưới đây để tạo nút gọi điện thoại.

Chèn code sau vào phần footer của web.

P/s: Bạn nhớ sửa lại số điện thoại thành số điện thoại của bạn nhé.

<div class="hotline-phone-ring-wrap">
<div class="hotline-phone-ring">
<div class="hotline-phone-ring-circle"></div>
<div class="hotline-phone-ring-circle-fill"></div>
<div class="hotline-phone-ring-img-circle">
<a href="tel:0903880905" class="pps-btn-img">
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitguxpwgytY8P7Pu6TbuG4CN-hzjPwRppLXp8xtY5hVM1UOoNQIGtRFFujxcYd77AsTz4p_bn-cPwWKxjkF27g8S8S3X5CJuJX2oSiKMGTryZ7eGoH84XMHsG92Doqa7J6-uoIjiX5HC8/s1600/icon-call-dichvuvip.png" alt="Gọi điện thoại" width="50">
</a>
</div>
</div>
<div class="hotline-bar">
<a href="tel:0903880905">
<span class="text-hotline">090 388 0905</span>
</a>
</div>
</div>

Sau đó, chèn đoạn CSS dưới đây vào file style.css trong theme bạn đang dùng.
P/s: Nếu bạn biết về CSS có thể chỉnh sửa lại màu sắc cho phù hợp với web của bạn.

.hotline-phone-ring-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999999;
}
.hotline-phone-ring {
  position: relative;
  visibility: visible;
  background-color: transparent;
  width: 110px;
  height: 110px;
  cursor: pointer;
  z-index: 11;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transition: visibility .5s;
  left: 0;
  bottom: 0;
  display: block;
}
.hotline-phone-ring-circle {
width: 85px;
  height: 85px;
  top: 10px;
  left: 10px;
  position: absolute;
  background-color: transparent;
  border-radius: 100%;
  border: 2px solid #e60808;
  -webkit-animation: phonering-alo-circle-anim 1.2s infinite ease-in-out;
  animation: phonering-alo-circle-anim 1.2s infinite ease-in-out;
  transition: all .5s;
  -webkit-transform-origin: 50% 50%;
  -ms-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  opacity: 0.5;
}
.hotline-phone-ring-circle-fill {
width: 55px;
  height: 55px;
  top: 25px;
  left: 25px;
  position: absolute;
  background-color: rgba(230, 8, 8, 0.7);
  border-radius: 100%;
  border: 2px solid transparent;
  -webkit-animation: phonering-alo-circle-fill-anim 2.3s infinite ease-in-out;
  animation: phonering-alo-circle-fill-anim 2.3s infinite ease-in-out;
  transition: all .5s;
  -webkit-transform-origin: 50% 50%;
  -ms-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}
.hotline-phone-ring-img-circle {
background-color: #e60808;
width: 33px;
  height: 33px;
  top: 37px;
  left: 37px;
  position: absolute;
  background-size: 20px;
  border-radius: 100%;
  border: 2px solid transparent;
  -webkit-animation: phonering-alo-circle-img-anim 1s infinite ease-in-out;
  animation: phonering-alo-circle-img-anim 1s infinite ease-in-out;
  -webkit-transform-origin: 50% 50%;
  -ms-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hotline-phone-ring-img-circle .pps-btn-img {
display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
.hotline-phone-ring-img-circle .pps-btn-img img {
width: 20px;
height: 20px;
}
.hotline-bar {
  position: absolute;
  background: rgba(230, 8, 8, 0.75);
  height: 40px;
  width: 160px;
  line-height: 40px;
  border-radius: 3px;
  padding: 0 10px;
  background-size: 100%;
  cursor: pointer;
  transition: all 0.8s;
  -webkit-transition: all 0.8s;
  z-index: 9;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.1);
  border-radius: 50px !important;
  /* width: 175px !important; */
  left: 33px;
  bottom: 37px;
}
.hotline-bar > a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  text-indent: 50px;
  display: block;
  letter-spacing: 1px;
  line-height: 40px;
  font-family: Arial;
}
.hotline-bar > a:hover,
.hotline-bar > a:active {
  color: #fff;
}
@-webkit-keyframes phonering-alo-circle-anim {
  0% {
    -webkit-transform: rotate(0) scale(0.5) skew(1deg);
    -webkit-opacity: 0.1;
  }
  30% {
    -webkit-transform: rotate(0) scale(0.7) skew(1deg);
    -webkit-opacity: 0.5;
  }
  100% {
    -webkit-transform: rotate(0) scale(1) skew(1deg);
    -webkit-opacity: 0.1;
  }
}
@-webkit-keyframes phonering-alo-circle-fill-anim {
  0% {
    -webkit-transform: rotate(0) scale(0.7) skew(1deg);
    opacity: 0.6;
  }
  50% {
    -webkit-transform: rotate(0) scale(1) skew(1deg);
    opacity: 0.6;
  }
  100% {
    -webkit-transform: rotate(0) scale(0.7) skew(1deg);
    opacity: 0.6;
  }
}
@-webkit-keyframes phonering-alo-circle-img-anim {
  0% {
    -webkit-transform: rotate(0) scale(1) skew(1deg);
  }
  10% {
    -webkit-transform: rotate(-25deg) scale(1) skew(1deg);
  }
  20% {
    -webkit-transform: rotate(25deg) scale(1) skew(1deg);
  }
  30% {
    -webkit-transform: rotate(-25deg) scale(1) skew(1deg);
  }
  40% {
    -webkit-transform: rotate(25deg) scale(1) skew(1deg);
  }
  50% {
    -webkit-transform: rotate(0) scale(1) skew(1deg);
  }
  100% {
    -webkit-transform: rotate(0) scale(1) skew(1deg);
  }
}
@media (max-width: 768px) {
  .hotline-bar {
    display: none;
  }
}

  
Trong đó:
Số điện thoại: Nhập số hotline bạn muốn hiện thị trên web đê người dùng gọi cho bạn.
Chọn giao diện: Hiện tại có 2 kiểu hiển thị cho bạn lựa chọn. Hãy chọn sau đó ấn lưu xem kiểu nào phù hợp với web nhé.
Màu sắc: Chọn màu sắc hiển thị cho nút gọi điện thoại.
Ấn thanh chứ số điện thoại: Tích vào nếu bạn muốn nó chỉ hiện thị nút Call rung lắc trên máy tính chứ không hiển thị số điện thoại.
Chỉ vậy thôi là xong rồi đó. Rất đơn giản đúng không nào!


Hãy áp dụng ngay cách tạo nút gọi điện thoại này cho web bán hàng, shop online của bạn ngay để gia tăng lượng khách hàng liên hệ qua hotline nhé. Chúc bạn thành công!


NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Autosave là một tính năng hay song cách hoạt động của nó gây khó chịu, dưới đây là cách bạn có thể tạm thời tắt tính năng này
Autosave là một plugin của ckeditor đã tích hợp mặc định trong trình soạn thảo NukeViet từ các phiên bản NukeViet 4. Đây là một plugin khá hay của ckeditor làm hạn chế việc mất nội dung trong quá trình soạn thảo vì nhiều lý do, song một điều gây khó chịu cho người sử dụng là thường hiển thị hộp thoại hỏi lại việc khôi phục nội dung trước đó trong khi người viết không có nhu cầu.


tắt autosave ckeditor
Hộp thoại gợi ý khôi phục nội dung đã được tự động lưu trước đó

Trong khi đợi giải pháp tốt hơn từ nhà phát triển, và bạn cũng chắc chắn không có nhu cầu dùng nhiều đến tính năng này, thì hãy làm theo bên dưới để tạm thời tắt tính năng này, bạn sẽ không còn bị làm phiền với cái hộp thoại này nữa!

1. Sửa tập tin cấu hình ckeditor
Mở assets/editors/ckeditor/config.js
Tìm
CKEDITOR.editorConfig = function( config ) {
Thêm bên dưới
config.removePlugins= 'autosave';
2. Dọn dẹp hệ thống
Truy cập ACP / Công cụ web / Làm sạch cache để các thay đổi có hiệu lực

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Hướng dẫn tự đông thêm liên kết cho từ khóa được tìm thấy trong nội dung của các module sử dụng NukeViet. Phương án này làm tăng đáng kể các liên kết nội bộ, hữu ích cho SEO
Cơ chế hoạt động

Dựa vào danh sách từ khóa (tag) của module, tìm trong nội dung tất cả các từ khóa có trong danh sách và thêm liên kết đến trang xem danh sách bài viết thuộc từ khóa cho từ khóa đó
Yêu cầu về module có thể tích hợp

Module có sử dụng chức năng tag (Quản lý từ khóa)
Một module có thể: news, shops, download

Hướng dẫn tích hợp cho module news (và các module ảo)
Mở modules/news/funcs/detail.php
Tìm
$contents = detail_theme($news_contents, $array_keyword, $related_new_array, $related_array, $topic_array, $content_comment);
Thêm bên trên
$auto_link_config = array(
    'auto_link' => 1, // 1: kích hoạt, 0: không kích hoạt
    'auto_link_casesens' => 1, // 1: không phân biệt ký tự HOA/thường, 0: ngược lại
    'auto_link_target' => '_blank', // phương án mở liên kết, xem thêm https://www.w3schools.com/tags/att_a_target.asp
    'auto_link_limit' => 3, // số lượng từ khóa sẽ thay thế. VD nội dung có 10 từ khóa thì chỉ thay thế 3 từ đầu tiên
    'auto_link_content' => $news_contents['bodyhtml'] // biến nội dung cần thay thế
);

if ($auto_link_config['auto_link']) {
    $reg_post = $auto_link_config['auto_link_casesens'] ? '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/imsu' : '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/msu';
    $sql = 'SELECT keywords, alias FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tags';
    $array_keywords = $nv_Cache->db($sql, 'tid', $module_name);
    foreach ($array_keywords as $keyword) {
        $url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $module_info['alias']['tag'] . '/' . $keyword['alias'];
        $regexp = str_replace('$content', $keyword['keywords'], $reg_post);
        $replace = '<a title="$1" href="$$$url$$$" ' . (! empty($keyword['auto_link_target']) ? 'target="' . $keyword['auto_link_target'] . '"' : '') . '>$1</a>';
        $newtext = preg_replace($regexp, $replace, $auto_link_config['auto_link_content'], $auto_link_config['auto_link_limit']);
        if ($newtext != $keyword['keywords']) {
            $auto_link_config['auto_link_content']= str_replace('$$$url$$$', $url, $newtext);
        }
    }
    $news_contents['bodyhtml'] = $auto_link_config['auto_link_content'];
}
Hướng dẫn tích hợp cho module Shops (và module ảo)
Mở modules/shops/funcs/detail.php
Tìm
$contents = detail_product($data_content, $data_unit, $data_others, $array_other_view, $content_comment, $compare_id, $popup, $idtemplate, $array_keyword);
Thêm bên trên
$auto_link_config = array(
    'auto_link' => 1, // 1: kích hoạt, 0: không kích hoạt
    'auto_link_casesens' => 1, // 1: không phân biệt ký tự HOA/thường, 0: ngược lại
    'auto_link_target' => '_blank', // phương án mở liên kết, xem thêm https://www.w3schools.com/tags/att_a_target.asp
    'auto_link_limit' => 3, // số lượng từ khóa sẽ thay thế. VD nội dung có 10 từ khóa thì chỉ thay thế 3 từ đầu tiên
    'auto_link_content' => $data_content[NV_LANG_DATA . '_bodytext'] // biến nội dung cần thay thế
);

if ($auto_link_config['auto_link']) {
    $reg_post = $auto_link_config['auto_link_casesens'] ? '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/imsu' : '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/msu';
    $sql = 'SELECT keywords, alias FROM ' . $db_config['prefix'] . '_' . $module_data . '_tags_' . NV_LANG_DATA;
    $array_keywords = $nv_Cache->db($sql, 'tid', $module_name);
    foreach ($array_keywords as $keyword) {
        $url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $module_info['alias']['tag'] . '/' . $keyword['alias'];
        $regexp = str_replace('$content', $keyword['keywords'], $reg_post);
        $replace = '<a title="$1" href="$$$url$$$" ' . (! empty($keyword['auto_link_target']) ? 'target="' . $keyword['auto_link_target'] . '"' : '') . '>$1</a>';
        $newtext = preg_replace($regexp, $replace, $auto_link_config['auto_link_content'], $auto_link_config['auto_link_limit']);
        if ($newtext != $keyword['keywords']) {
            $auto_link_config['auto_link_content']= str_replace('$$$url$$$', $url, $newtext);
        }
    }
    $data_content[NV_LANG_DATA . '_bodytext'] = $auto_link_config['auto_link_content'];
}

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Hôm nay, mình sẽ chia sẻ với các bạn về một vài thủ thuật CSS hay rất hữu ích trong quá trình phát triển Frontend.



1. Image rendering:
Thuộc tính này khá hữu ích trong việc hiển thị mã QR và các thumbnails, giúp tăng chất lượng ảnh của chúng.
img.QRcode { image-rendering: pixelated; }

2. Check empty:

Ẩn phần tử khi không có nội dung bên trong. Trả về khoảng trắng thay cho phần nội dung bị khuyết.
element:empty { display: none; }

3. Tạo độ cong cho 
text:p { shape-outside: polygon(0 0, 0 200px, 300px 600px); }
Thuộc tính này giúp phần content bao quanh bên ngoài sẽ có hình dạng cong.

4. Plain SVG như 
background:element { background-image: url('data:image/svg+xml;utf8,...'); }

Use như một css background mà không cần convert sang base64.

5. Vô hiệu hoá các tương tác:
[data-untouchable] { pointer-events: none; }
Vô hiệu hoá tất cả các tương tác của người dùng, thậm chí cả các sự kiện css chỉ bằng một thuộc tính.


6. Kiểm tra nếu input có giá trị:
.Note { opacity: 0; transition: opacity 200ms ease-out; } input:not(:placeholder-shown) + .Note { opacity: 1; }
Pseudo class này sẽ cho phép kiểm tra xem input có giá trị nào không.

7. Lặp lại gradients:
.RepeatLinear { background: repeating-linear-gradient( 45deg, lime, lime 10px, pink 10px, pink 20px ); } .RepeatRadial { background: repeating-conic-gradient( circle at 0 0, tomato, limegreen 50px ); }

Có thể sử dụng lặp lại gradient thay vì bị rối loạn với mixins.

8. Float dựa theo hướng:
img { float: inline-start; /* ...or inline-end */ }

Float một phần tử dựa theo hướng một văn bản
(right-to-left hoặc left-to-right)

9. Target mặc định đến một phần tử trong form:
input:default { opacity: 0.2; }

Target đến phần input mặc định được selected. Xem ví dụ

10. Import css khi cần:

@import url('portrait.css') screen and (orientation: portrait); 
Có thể import css theo cách trên như khi sử dụng trong thẻ .


11. Ngăn việc over-scroll:
.ScollingContent { overscroll-behavior: contain; }

Ngăn việc over-scroll khi scroll đến điểm cuối của phần tử.
Hôm nay mình sẽ chia sẻ cho các bạn những đoạn css giúp các bạn tạo nên những hình vuông, hình tròn, hình tam giác… và qua bài viết này, chắc chắn một điều là các bạn sẽ nâng cao kinh nghiệm cũng như trình độ về CSS3 của bạn nên đáng kể.


Square

#square { width: 140px; height: 140px; background: blue; }



Circle

#circle { width: 140px; height: 140px; background: blue; -moz-border-radius: 70px; -webkit-border-radius: 70px; border-radius: 70px; }

Oval


#oval { width: 200px; height: 100px; background: blue; -moz-border-radius: 100px / 50px; -webkit-border-radius: 100px / 50px; border-radius: 100px / 50px; }

Up Triangle


#up-triangle { width: 0; height: 0; border-bottom: 120px solid blue; border-left: 60px solid transparent; border-right: 60px solid transparent; }


Down Triangle
#down-triangle { width: 0; height: 0; border-top: 120px solid blue; border-left: 60px solid transparent; border-right: 60px solid transparent; }

Left Triangle

#left-triangle { width: 0; height: 0; border-right: 100px solid blue; border-top: 50px solid transparent; border-bottom: 50px solid transparent; }


Right Triangle
#right-triangle { width: 0; height: 0; border-left: 100px solid blue; border-top: 50px solid transparent; border-bottom: 50px solid transparent; }

Triangle Top Left
#triangle-topleft { width: 0; height: 0; border-top: 100px solid blue; border-right: 100px solid transparent; }



Triangle Top Right
#triangle-topright { width: 0; height: 0; border-top: 100px solid blue; border-left: 100px solid transparent; }


Triangle Bottom Left

#triangle-bottomleft { width: 0; height: 0; border-bottom: 100px solid blue; border-right: 100px solid transparent; }

Triangle Bottom Right

#triangle-bottomright { width: 0; height: 0; border-bottom: 100px solid blue; border-left: 100px solid transparent; }



Trapezium


#trapezium { height: 0; width: 80px; border-bottom: 80px solid blue; border-left: 40px solid transparent; border-right: 40px solid transparent; }



Diamond


#diamond { width: 80px; height: 80px; background: blue; margin: 3px 0 0 30px; /* Rotate */ -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); /* Rotate Origin */ -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; }



Rectangle


#rectangle { width: 140px; height: 80px; background: blue; }



Parallelogram


#parallelogram { width: 130px; height: 75px; background: blue; /* Skew */ -webkit-transform: skew(20deg); -moz-transform: skew(20deg); -o-transform: skew(20deg); transform: skew(20deg); }



Twelve Point Star


#twelve-point-star { height: 100px; width: 100px; background: blue; position: absolute; } #twelve-point-star:before { height: 100px; width: 100px; background: blue; content:""; position: absolute; /* Rotate */ -moz-transform: rotate(30deg); -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); -o-transform: rotate(30deg); transform: rotate(30deg); } #twelve-point-star:after { height: 100px; width: 100px; background: blue; content:""; position: absolute; /* Rotate */ -moz-transform: rotate(-30deg); -webkit-transform: rotate(-30deg); -ms-transform: rotate(-30deg); -o-transform: rotate(-30deg); transform: rotate(-30deg); }



Six Point Star


#six-point-star { position: absolute; width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 80px solid blue; } #six-point-star:after { content:""; position: absolute; width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-top: 80px solid blue; margin: 30px 0 0 -50px; }



Octagon


#octagon { width: 100px; height: 100px; background: blue; } #octagon:before { height: 0; width: 40px; content:""; position: absolute; border-bottom: 30px solid blue; border-left: 30px solid white; border-right: 30px solid white; } #octagon:after { height: 0; width: 40px; content:""; position: absolute; border-top: 30px solid blue; border-left: 30px solid white; border-right: 30px solid white; margin: 70px 0 0 0; }



Speech Bubble


#speech-bubble { width: 120px; height: 80px; background: blue; position: absolute; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; } #speech-bubble:before { content:""; position: absolute; width: 0; height: 0; border-top: 13px solid transparent; border-right: 26px solid blue; border-bottom: 13px solid transparent; margin: 13px 0 0 -25px; }



Egg


#egg { display:block; width:126px; /* width has to be 70% of height */ /* could use width:70%; in a square container */ height:180px; background-color:blue; /* beware that Safari needs actual px for border radius (bug) */ -webkit-border-radius:63px 63px 63px 63px/ 108px 108px 72px 72px; /* fails in Safari, but overwrites in Chrome */ border-radius:50% 50% 50% 50%/60% 60% 40% 40%; }



EQ Triangle


#eq-triangle { width: 0; height: 0; border-bottom: 104px solid blue; /* 104 = 120 * 0.866 */ border-left: 60px solid transparent; border-right: 60px solid transparent; }



Pacman


#pacman { width: 0px; height: 0px; border-right: 60px solid transparent; border-top: 60px solid blue; border-left: 60px solid blue; border-bottom: 60px solid blue; border-top-left-radius: 60px; border-top-right-radius: 60px; border-bottom-left-radius: 60px; border-bottom-right-radius: 60px; }



Biohazard


#biohazard { width: 0; height: 0; border-bottom: 60px solid black; border-top: 60px solid black; border-left: 60px solid yellow; border-right: 60px solid yellow; -moz-border-radius: 60px; -webkit-border-radius: 60px; border-radius: 60px; }



Heart


#heart { position: relative; } #heart:before, #heart:after { position: absolute; content: ""; left: 70px; top: 0; width: 70px; height: 115px; background: blue; -moz-border-radius: 50px 50px 0 0; border-radius: 50px 50px 0 0; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; } #heart:after { left: 0; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 100% 100%; -moz-transform-origin: 100% 100%; -ms-transform-origin: 100% 100%; -o-transform-origin: 100% 100%; transform-origin :100% 100%; }



Infinity


#infinity { position: relative; width: 164px; height: 80px; } #infinity:before, #infinity:after { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 40px; border: 20px solid blue; -moz-border-radius: 50px 50px 0 50px; border-radius: 50px 50px 0 50px; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); } #infinity:after { left: auto; right: 0; -moz-border-radius: 50px 50px 50px 0; border-radius: 50px 50px 50px 0; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); y transform: rotate(45deg); }



Mình hy vọng là với những hình trên, sẽ tiết kiệm cho các bạn rất nhiều thời gian cũng như hiểu rõ hơn về các thuộc tính mới của CSS3. Có thể nhiều hình sẽ không hiển thị đúng như trong hình (do nhiều trình duyệt chưa hỗ trợ) nên các bạn nên test thử trên các phiên bản trình duyệt mới nhất của Firefox hay Chrome để có hiệu quả tốt nhất nhé.

Setup WOW.js

1
Link to the CSS animation library

Link to Animate.css 
(You can link to another CSS animation library by changing WOW.js settings)

2
Link and activate WOW.js

              
              

Reveal CSS Animations

1
Make an element revealable

Add the CSS class .wow to a HTML element: it will be invisible until the user scrolls to reveal it.
(You can change this CSS class in the WOW settings to avoid name conflicts.)
                
Content to Reveal Here

2
Choose the animation style

Pick an animation style in Animate.css , then add the CSS class to the HTML element
                  
Content to Reveal Here

You’re done!

Now your animations will be revealed when the user scrolls.
Check these examples of WOW.js + Animate.css uses:

* MaterialUp 
* Fliplingo 
* Streamline Icons

Advanced Options

data-wow-duration: Change the animation duration
data-wow-delay: Delay before the animation starts
data-wow-offset: Distance to start the animation (related to the browser bottom)
data-wow-iteration: Number of times the animation is repeated
                    

Customize Settings

boxClass: Class name that reveals the hidden box when user scrolls.
animateClass: Class name that triggers the CSS animations (’animated’ by default for the animate.css library)
offset: Define the distance between the bottom of browser viewport and the top of hidden box.
When the user scrolls and reach this distance the hidden box is revealed.
mobile: Turn on/off WOW.js on mobile devices.
live: consatantly check for new WOW elements on the page.

                      wow = new WOW(
                      {
                      boxClass:     'wow',      // default
                      animateClass: 'animated', // default
                      offset:       0,          // default
                      mobile:       true,       // default
                      live:         true        // default
                    }
                    )
                    wow.init();


NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP 
PHÁT TRIỂN
Luôn đồng hành cùng bạn!
WebDesign - Hosting - Domain name - Advertising

THÔNG TIN LIÊN HỆ:
Địa Chỉ:104/1 QL 13 (cũ), P.Hiệp Bình Phước, Q.Thủ Đức, Tp.HCM
Điện thoại: (84) 903 880 905 Mr.Vương
Email: phattriennet@gmail.com / support@phattrien.net / hotro@phattrien.net / kinhdoanh@phattrien.net
Website: http://phattrien.net - http://thongbao.phattrien.net - http://athietkeweb.com - http://news.phattrien.net - http://nukevietcms.com - http://webnukeviet.com - http://trangvangdichvu.com - http://trangvangmuaban.com / Của Hàng Camera / Camera Việt Nam / Nhà Phân Phối Camera

THÔNG TIN THANG TOÁN
Số tài khoản: 008 100 070 9942 Ngân hàng VietComBank (Chi nhánh TP Vũng Tàu)
Số tài khoản: 046 100 381 3474 Ngân hàng VietComBank HCM, PGD Nơ Trang Long.
Chủ tài khoản: Tạ Thiên Minh Vương

Tên miền quốc tế   Tên miền Việt Nam   Window Web Hosting   Linux Web Hosting  Dịch vụ Hosting giá rẻ  Tính năng chung  Java Web Hosting  Reseller Linux Hosting  Reseller Window Hosting  DV Email và tính năng  Email Hosting  Email Server Riêng  Thuê máy chủ ảo  Thuê máy chủ riêng  Thuê chỗ đặt máy chủ  Chứng chỉ số SSL là gì  Lựa chọn loại SSL  Bảng giá Global Sign  Thiết kế Website

Nhà Phân Phối Camera,Bán Camera Quan Sát,Bán Camera Giá Rẻ,Camera Việt Nam,Camera WinTech,WinTech Việt Nam,Camera Miền Tây,Camera quan sát Đồng Nai,Camera quan sát DakLak,Nhà phân phối máy bộ đàm,Máy bộ đàm chính hãng,Máy bộ đàm giá rẻ
Ứng dụng tạo gợi ý nhanh class của Animate.css trong Atom Editer Link Animate.css: https://daneden.github.io/animate.css/

Cài đặt

Chạy dòng lệnh bên dưới:
apm install animate-css
Ngoài ra, vào Atom > Preferences > Packages và tìm với từ khóa animate-css.

Hướng dẫn sử dụng

Animate CSS thường được sử dụng với WOW.JS để tạo hiệu ứng đẹp mắt trong web site như làm chậm hoặc các chuyển động thường thấy trong slide powerpoint.

Giới thiệu Wow.js

WOW.js được phát triển bởi @Matthieu_Aussaguel, một kỹ sư lập trình web hiện đang sống và làm việc tại Thái Lan. WOW.js là sự kết hợp giữa jQuery và thư viện animation.css được viết sẵn các kịch bản. Khi bạn scroll website thì jQuery sẽ bắt sự kiện và kích hoạt chuyển động, các đối tượng sẽ chuyển động và diễn hoạt với sự hỗ trợ của CSS 3 Animation và CSS 3 Transition.

Cách dùng wow.js và animate.css

  1. Thêm animate.css vào bên trong cặp thẻ 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.css">
  1. Trước thẻ đóng 
 thêm và kích hoạt wow.js
<script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script>
  new WOW().init();
</script> 
  1. Chọn hiệu ứng (hoặc chuyển động) bằng cách thêm wow tên_hiệu_ứng ví dụ:
<div class="wow bounceInUp">
  Content to Reveal Here
</div>

Nâng cao

Ngoài cách thể hiện sự chuyển động bạn cũng có thể kiểm soát số lần chuyển động, thời gian chuyển động, thời điểm chuyển động...
<div class="wow bounce" data-wow-duration="2s" data-wow-delay="3s" data-wow-iteration="5" data-wow-offset="100">Hello! Xin chào các bạn !!</div>
data-wow-duration="2s"
Thời gian chuyển động của đối tượng. Ở ví dụ này là 2s.
data-wow-delay="3s"
Thời gian chờ để chuyển động. Khi bạn cuộn màng hình tới đối tượng thì đối tượng cần một khoảng thời gian để bắt đầu chuyển động. Ở ví dụ này là chờ 3s.
data-wow-iteration="5"
Số lần chuyển động lặp lại. Ở ví dụ này là lặp lại 3 lần.
data-wow-offset="100"
Khoảng cách từ đối tượng tới điểm cuối màng hình để đối tượng bắt đầu chuyển động. Ở ví dụ này, khi khoảng cách của đối tượng với màng hình 100px đối tượng sẽ chuyển động.

Các loại hiệu ứng

  • bounce
  • bounceIn
  • bounceInDown
  • bounceInLeft
  • bounceInRight
  • bounceInUp
  • bounceOut
  • bounceOutDown
  • bounceOutLeft
  • bounceOutRight
  • bounceOutUp
  • fadeIn
  • fadeInDown
  • fadeInDownBig
  • fadeInLeft
  • fadeInLeftBig
  • fadeInRight
  • fadeInRightBig
  • fadeInUp
  • fadeInUpBig
  • fadeOut
  • fadeOutDown
  • fadeOutDownBig
  • fadeOutLeft
  • fadeOutLeftBig
  • fadeOutRight
  • fadeOutRightBig
  • fadeOutUp
  • fadeOutUpBig
  • flash
  • flip
  • flipInX
  • flipInY
  • flipOutX
  • flipOutY
  • headShake
  • hinge
  • jello
  • lightSpeedIn
  • lightSpeedOut
  • pulse
  • rollIn
  • rollOut
  • rotateIn
  • rotateInDownLeft
  • rotateInDownRight
  • rotateInUpLeft
  • rotateInUpRight
  • rotateOut
  • rotateOutDownLeft
  • rotateOutDownRight
  • rotateOutUpLeft
  • rotateOutUpRight
  • rubberBand
  • shake
  • slideInDown
  • slideInLeft
  • slideInRight
  • slideInUp
  • slideOutDown
  • slideOutLeft
  • slideOutRight
  • slideOutUp
  • swing
  • tada
  • wobble
  • zoomIn
  • zoomInDown
  • zoomInLeft
  • zoomInRight
  • zoomInUp
  • zoomOut
  • zoomOutDown
  • zoomOutLeft
  • zoomOutRight
  • zoomOutUp


NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP 
PHÁT TRIỂN
Luôn đồng hành cùng bạn!
WebDesign - Hosting - Domain name - Advertising

THÔNG TIN LIÊN HỆ:
Địa Chỉ:104/1 QL 13 (cũ), P.Hiệp Bình Phước, Q.Thủ Đức, Tp.HCM
Điện thoại: (84) 903 880 905 Mr.Vương
Email: phattriennet@gmail.com / support@phattrien.net / hotro@phattrien.net / kinhdoanh@phattrien.net
Website: http://phattrien.net - http://thongbao.phattrien.net - http://athietkeweb.com - http://news.phattrien.net - http://nukevietcms.com - http://webnukeviet.com - http://trangvangdichvu.com - http://trangvangmuaban.com / Của Hàng Camera / Camera Việt Nam / Nhà Phân Phối Camera

THÔNG TIN THANG TOÁN
Số tài khoản: 008 100 070 9942 Ngân hàng VietComBank (Chi nhánh TP Vũng Tàu)
Số tài khoản: 046 100 381 3474 Ngân hàng VietComBank HCM, PGD Nơ Trang Long.
Chủ tài khoản: Tạ Thiên Minh Vương

Tên miền quốc tế   Tên miền Việt Nam   Window Web Hosting   Linux Web Hosting  Dịch vụ Hosting giá rẻ  Tính năng chung  Java Web Hosting  Reseller Linux Hosting  Reseller Window Hosting  DV Email và tính năng  Email Hosting  Email Server Riêng  Thuê máy chủ ảo  Thuê máy chủ riêng  Thuê chỗ đặt máy chủ  Chứng chỉ số SSL là gì  Lựa chọn loại SSL  Bảng giá Global Sign  Thiết kế Website

Nhà Phân Phối Camera,Bán Camera Quan Sát,Bán Camera Giá Rẻ,Camera Việt Nam,Camera WinTech,WinTech Việt Nam,Camera Miền Tây,Camera quan sát Đồng Nai,Camera quan sát DakLak,Nhà phân phối máy bộ đàm,Máy bộ đàm chính hãng,Máy bộ đàm giá rẻ

Translate

Quan tâm nhiều

Theo thời gian

Biểu mẫu liên hệ

Tên

Email *

Thông báo *