7.24
CSS3 屬性之 transform & translation
transform:
translation:
transition 屬性是一個簡寫屬性,用於設置四個過渡屬性:
- transition-property
- transition-duration
- transition-timing-function
- transition-delay
JQuery獲取當前窗口信息
方法 | 解釋 | 輸出 |
---|---|---|
window.location.href | 設置或獲取整個 URL 爲字符串。 | http://localhost:8086/topic/index?topicId=361 |
window.location.pathname | 設置或獲取對象指定的文件名或路徑。 | /topic/index |
window.location.port | 設置或獲取與 URL 關聯的端口號碼。 | 8086 |
window.location.protocol | 設置或獲取 URL 的協議部分。 | http: |
window.location.hash | 設置或獲取 href 屬性中在井號“#”後面的分段。 | |
window.location.host | 設置或獲取 location 或 [URL]。 | http:localhost:8086 |
window.location.search | 設置或獲取 href 屬性中跟在問號後面的部分。 | ?topicId=361 |
以這個網址爲例 http://localhost:8086/topic/index?topicId=361
方法 | 解釋 | 輸出 |
---|---|---|
window.location.href | 設置或獲取整個 URL 爲字符串。 | http://localhost:8086/topic/index?topicId=361 |
window.location.pathname | 設置或獲取對象指定的文件名或路徑。 | /topic/index |
window.location.port | 設置或獲取與 URL 關聯的端口號碼。 | 8086 |
window.location.protocol | 設置或獲取 URL 的協議部分。 | http: |
window.location.hash | 設置或獲取 href 屬性中在井號“#”後面的分段。 | |
window.location.host | 設置或獲取 location 或 [URL]。 | http:localhost:8086 |
window.location.search | 設置或獲取 href 屬性中跟在問號後面的部分。 | ?topicId=361 |
7.28
- vue加載swiper 初始化會默認滑到最後一個slider-item
可以用setTimeOut解決,延遲swiper的初始化 - vue動態數據加載的元素無法在DOM樹中查找到,不能直接使用addClass來實現點擊的active,此時可以結合v-bind:class來實現,
例如使用V-for循環加載數據時,可以通過獲取點擊節點的index來實現添加active