主頁
WIX服務介紹
WIX進階服務方案
WIX教學
活動及課程
Blog
WIXHK討論區
聯絡我們
More
請問要如何做到 Underline Hover Effect ?
請問是一般文字懸停效果, 例如下面的例子是嗎? 請參考這裡, 或是有其他效果要求, 請再說明
對 類似以上例子 當滑鼠懸停在文字上方時 線條從文字下方 由左至右劃過 除了選單外 亦希望能應用在普通頁面的按鈕上
不好意思, 選單的互動效果是固定, 沒有辦法在選單上更改
至於"普通頁面的按鈕", 也沒有辦法在按鈕上更改它的互動效果, 除非使用HTML工具嵌入。也不能把它使用在段落裡面部份的文字。查看現有的按鈕, 也有數個是懸停underline效果的, 請參考:
其次, 可以使用HTML工具嵌入, 程式碼如下:
<ul> <li><a href="https://wixhk.com" target="blank">Home</a></li> </ul> <style> body,html { margin: 0; font: bold 24px/1.4 'Helvetica', arial, sans-serif; background: #fff; } ul { margin: 150px auto 0; padding: 0; list-style: none; display: table; width: 600px; text-align: center; } li { display: table-cell; position: relative; padding: 15px 0; } a { color: #000; text-transform: uppercase; text-decoration: none; letter-spacing: 0.15em; display: inline-block; padding: 15px 20px; position: relative; } a:after { background: none repeat scroll 0 0 transparent; bottom: 0; content: ""; display: block; height: 2px; left: 50%; position: left; background: #000; transition: width 0.3s ease 0s, left 0.3s ease 0s; width: 0; } a:hover:after { width: 100%; left: 0; } @media screen and (max-height: 300px) { ul { margin-top: 40px; } } </style>
程式碼參考: https://codepen.io/jstn/pen/mdoOZJ
請問是一般文字懸停效果, 例如下面的例子是嗎? 請參考這裡, 或是有其他效果要求, 請再說明