Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Tuesday, June 7, 2016

Responsive Boostrap

Responsive Boostrap
Responsive Boostrap
xs (768px ≥ xs ≥ 320px) = .col-xs-*
small (991px ≥ small ≥ 768px) = .col-sm-*
medium (1199px ≥ medium ≥ 992px) = .col-md-*
large ( large ≥ 1200px) = .col-lg-*

@media only screen and (min-width: 1200px) {
.grid-offer-photo img {
width: 263px;
height: 185px;
}
}

@media only screen and (min-width: 768px) and (max-width: 1199px) {
.grid-offer-photo img {
width: 330px;
height: 247px;
}
}

@media only screen and (min-width: ...px) and (max-width: ...px) {
// code here
}
Read More

Friday, May 27, 2016

CSS Tricks

Tutorial về Css, dùng ngon lành cho jQuery. Đọc ở đây 

-Sưu tầm từ chia sẻ của Tuấn Vũ IT -

Read More

Thursday, May 26, 2016

Thay đổi thuộc tính của thẻ a hay bất cứ thẻ gì khác bằng jQuery bằng thuộc tính attr

jQuery("#sidebar .page-item-1035 a").attr("href", "/products-services");

Theo thuốc tính mặc định hiển có, để không phải sửa nhiều thứ lỗi tùm lum thì dùng jQuery để thay đổi thuộc tính từ trước đó, cách đổi là jQuery().attr(tên thuộc tính, thuộc tính muốn thay đổi);





Read More

Wednesday, May 18, 2016

Tạo Menu theo hàng ngang bằng html và css



<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
p, ul, li, div, nav { padding:0; margin:0; } body { font-family:Roboto; }
#menu { overflow: auto; position:relative; z-index:2; }
.parent-menu { background-color: #ffffff; min-width:200px; float:left; }
#menu ul { list-style-type:none; }
#menu ul li a { padding:10px 15px; display:block; color:#000000; text-decoration:none; }
#menu ul li a:hover { background-color:#35baf2; }
#menu ul li:hover > ul { left: 200px; -webkit-transition: left 200ms ease-in; -moz-transition: left 200ms ease-in; -ms-transition: left 200ms ease-in; transition: left 200ms ease-in; }
#menu ul li > ul { position: absolute; background-color: #35baf2; top: 0; left: -200px; min-width: 200px; z-index: -1; height: 100%; -webkit-transition: left 200ms ease-in; -moz-transition: left 200ms ease-in; -ms-transition: left 200ms ease-in; transition: left 200ms ease-in; }
#menu ul li > ul li a:hover { background-color:#2e2e2e; }


</style>
</head>
<body>
<nav id="menu">
<ul class="parent-menu">
<li><a href="#">Máy Lọc Nước Gia Đình</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
</li>
<li><a href="#">Máy Lọc Nước Nhập Khẩu</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul></li>
<li><a href="#">Máy Lọc Nước Nano</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul></li>
<li><a href="#">Máy Lọc Nước RO</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
</li>
<li><a href="#">Máy Lọc Nước Giếng</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
</li>
<li><a href="#">Máy Lọc Nước Văn Phòng</a>
<ul>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>
</li>
</ul>
</nav>


</body>
</html>
Read More

Sunday, May 8, 2016

jQuerry chinh Sticky class id Wordpress

jQuerry chinh Sticky class id Wordpress
jQuerry chinh Sticky class id Wordpress

/*Hàm này để luôn luôn load khi cuộn trang*/ 
jQuery(window).scroll(function() {
if (jQuery(window).scrollTop() >= 800) /*Nếu đến đúng 800px thì thực hiện*/
{
jQuery('#id-sticky-1').css({"position": "fixed", "top": "50px", "z-index": "999", "width" : "100%"});
jQuery('#id-sticky-2').css({"position": "fixed", "top": "50px", "z-index": "999", "width" : "100%"});

}
else /*Nếu không thì trả về*/
{
jQuery('#id-sticky-1').css({"position": "relative", "top": "0px", "z-index": "999" ,"width" : "100%"});
jQuery('#id-sticky-1').css({"position": "relative", "top": "0px", "z-index": "999" ,"width" : "100%"});

}
});
Read More

Tuesday, May 3, 2016

Tạo hiệu ứng FAQ câu hỏi thường gặp bằng js, css, html




<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
<a href="#" onclick="toggle_visibility('foo');">Click here to toggle visibility of element #foo</a>
<br />
<div id="foo" style="display: none;">
This is foo</div>
Read More

Monday, April 25, 2016

Ẩn text rồi thay thế bằng CSS

Cách 1:


.fusion-secondary-header .fusion-mobile-selector::after {
    content: 'Login';
    padding-left:5px;
}
.fusion-secondary-header .fusion-mobile-selector span {
    display: none;
}
.fusion-secondary-main-menu .fusion-mobile-selector::after {
    content: 'Menu';
    padding-left:5px;
}
.fusion-secondary-main-menu .fusion-mobile-selector span {
    display: none;
}




Cách 2:


#toplevel_page_ab-system .wp-menu-name {
  text-indent: -9999px;
  line-height: 0; /* Collapse the original line */
}

#toplevel_page_ab-system .wp-menu-name::after {
  content: "Appointments";
  text-indent: 0;
  display: block;
  line-height: initial; /* New content takes up original line height */
}

Read More