课程: Design the Web: Creating a Sortable Table
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Creating CSS triangles to indicate sort order
课程: Design the Web: Creating a Sortable Table
Creating CSS triangles to indicate sort order
- [Voiceover] Now that we're highlighting the table cell that represents the column that the table's being sorted against, now what we're going to do is create some arrows with CSS to indicate the direction of the sort, whether the sort is in an ascending or descending order. Now we already have the classes being injected, so let's go back to our CSS file and add in some additional rules. And now to add the object for the triangle, I don't want to go back to the HTML and add in some additional HTML markup. So we're going to use the CSS pseudo element to inject an object and then create our triangles using some border properties. So in our CSS file, let's hit a few Returns. I want to create these new rules or pseudo element into the th.sorted after this rule here. So let's come up here and copy this entire rule. After this, let's paste this again. Now what we want to do is add this pseudo element to the th.sorted, so we'll type two colons, then the word after, then a space, then put in…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
Preparing the HTML file3 分钟 13 秒
-
(已锁定)
Activating the plugin6 分钟 2 秒
-
(已锁定)
Setting a default sort on page load3 分钟 24 秒
-
(已锁定)
Highlighting the sorted column4 分钟 54 秒
-
(已锁定)
Creating CSS triangles to indicate sort order4 分钟 34 秒
-
(已锁定)
Creating custom sort properties8 分钟 16 秒
-
(已锁定)
Where to go from here55 秒
-