图片切换 怎么都做不出想要的效果
怎么回事 求大神指教
2015-03-29
因為只有一組li,所以不用加 ul >
/*任务一、设置不同列表的背景色*/
你原本輸入:
1 | ul > li:nth-child( 2 ) |
這題更改如下,其他自行變更:
1 | li:nth-of-type( 2 ) a |
/*任务二、设置缩略图形状*/
你原本輸入:
1 | ul > li > a:after |
這題更改如下,其他自行變更:
1 | li a:after 或 a:after |
/*任务三、设置缩略图背景图像*/
你原本輸入:
1 | ul > li:nth-of-type( 2 ) a:after |
這題更改如下,其他自行變更:
1 | li:nth-of-type( 2 ) a:after |
/*任务四、给缩略图添加蒙板效果*/
你原本輸入:
1 | ul > li > a:before |
這題更改如下,其他自行變更:
1 | li a:before 或 a:before |
/*任务五、鼠标悬浮时,修改缩略图蒙板透明度*/
你原本輸入:
1 | ul > li > a:hover:before |
建議如下: 要更改的縮圖是 a,不用加 ul > li > 也可以
1 | li:hover a:before 或 a:hover:before |
/*任务七、设置不显示的背景图层级*/
你原本輸入:
1 | img.bg:not(:target) |
建議如下: 已知 .bg 是img不用再加img
1 | .bg:not(:target) |
举报