twitter@js_bankfacebook@jsbankrss@jsbank






45 giải pháp CSS và JavaScript tuyệt vời CSS và JavaScript là hai thành tố không thể thiếu với bất kì một website nào, cũng như đối với các nhà thiết kế và phát triển web. Đôi lúc, chúng tạo nên một số rắc rối về mặt kĩ thuật trong một vài vấn đề.

Nhưng điều tốt là với sự phát triển mạnh mẽ của Internet trong thời đại ngày nay, các nhà thiết kế và phát triển web luôn tìm ra được giải pháp và thủ thuật cho các rắc rối này, và chia sẻ với những người khác. Bài viết này tổng hợp 45 thủ thuật giúp bạn giải quyết nhanh chóng các rắc rối CSS, JavaScript thường gặp. Nếu biết nhiều hơn, bạn có thể chia sẻ với chúng tôi tại đây.


Nhãn: 45, giải pháp CSS, tuyệt vời, thành tố, thiết kế web, phát triển web, rắc rối, kĩ thuật, Internet

Tạo video bằng AI chỉ với giọng nói hoặc văn bản



Ứng dụng video AI MIỄN PHÍ hàng đầu của bạn! Tự động hóa video AI đầu tiên của bạn. Tạo Video Chuyên Nghiệp Của Bạn Trong 5 Phút Bằng AI Không Cần Thiết Bị Hoặc Kỹ Năng Chỉnh Sửa Video. Sản xuất video dễ dàng dành cho nhà tiếp thị nội dung.
Ứng dụng video AI KHÔNG GIỚI HẠN miễn phí trong tay bạn

CSS Lists

Create a Microsoft Word-Style Outline with CSS
As you can see, the browser doesn't bother to vary the indentation style much, or change the list type from roman numerals to alphabetical characters and so on... all the things we're so used to seeing because Microsoft Word and other writing programs do them by default. So let's use a bit of CSS ingenuity to make a Microsoft Word-styled outline using ordered lists!

Pure CSS Timeline
"I wanted to build a CSS timeline for the "About" section of my site while using some clean and simple markup. I wanted to avoid using images as much as possible, so I spent a few minutes prototyping some options and came up with a solution using unordered lists. The result is a simple and clean looking timeline with some very straight forward markup. In this article I'll share my approach to creating a timeline out of CSS and HTML which results in a nice looking, simple timeline."

Automatic numbering with CSS Counters
When writing documents, it is often useful to number sections and have a table of contents. You can number these by hand, directly in the markup, but this can be time consuming if the order changes and you have to edit all the numbers. CSS2.1 gives us a automated way to generate numbers using CSS counters, and this article will walk you through how to use them. One word of note before we start is that CSS counters are not yet implemented in IE, although they are on the roadmap for IE8.

CSS tricks for custom bullets

Elastic Calendar Styling with CSS
A traditional calendar is a grid of numbered boxes on a page. As a web designer, you might go right for a table, and I wouldn't fault you for that. Tables, though, can sometimes be tough to muscle into shape. The CSS purist in me gets pissed when I set the width of a table (or a cell) and it decides it knows better and grows or shrinks as it sees fit.
You can tackle calendar styling with pure CSS, and I feel it makes just as much sense semantically as a table does. What is a calender, if not an ordered list of days? By using CSS, we can even do some cool things like do all our sizing with ems so our calendar layout will be elastic. That is, grow in both width and height when text is resized in browsers, while greatly increasing accessibility.

Style a List with One Pixel
A one-pixel background image can be a pretty versatile thing. With repeat-x it can be a horizontal line, repeat-y makes a vertical line, and repeat makes it a fill color. Just as a little fun proof of concept, we can use that to create a depth-chart looking unordered list.

Style Your Ordered List
By default, most browsers display the ordered list numbers same font style as the body text. Here is a quick CSS tutorial on how you can use the ordered list (ol) and paragraph (p) element to design a stylish numbered list.

Simulating a Table Using an Unordered List
Your first question immediately might be, "why would I want to simulate a table with a list, why not just use a table?" With the raise in popularity of AJAX sortable list elements, using list items to represent a multiple column data table can allow for easy sorting of various more "tabley" information. So let's get started.

8 different ways to beautifully style your HTML lists with CSS
"The use of HTML lists (<ol> for an ordered list, <ul> for an unordered list) is very common these days. Today, we're going to look a little bit further than creating regular lists, by showing 8 different ways to beautifully style your HTML lists with CSS. We'll use some pure CSS techniques to make a bored list look awesome (and even have some extra functionality)."

Quick Tip - Simplify List Margins with CSS
Have you ever set default margins for a layout, and then had to go back and manually adjust all of your lists? By default, list item markers have a negative positioning in relationship to the list item itself. This means that zero-ing out margins automatically leads to an overflow if the list is contained inside anything else. Wouldn't it be easier to put the list item marker at the same starting point as other elements instead? Lucky for us, there's a style to help do just that. Let's see what can be done with the list-style-position property.

Sexy HTML List Tricks
Behold the ubiquitous list elements, <ul> and <ol>. These two sexy elements help millions of websites display lists of information in clean, semantic fashion. Without them, we'd be crawling around like filthy cavemen, eating dirt and howling at the moon. But these list elements aren't just sexy, they are also extremely flexible, enabling us humble designers to create robust list configurations that are semantically versatile and highly customizable.

Clickable <li>
I originally coded the markup to be a table, but discovered a problem when I tried to make the whole row clickable. I ended up with a list of articles instead.


Google Safe Browsing McAfee SiteAdvisor Norton SafeWeb Dr.Web