頁:
[1]
請問下拉式選單加上卷軸要怎麼做?
最近有一個網頁修改的需求,是要做導覽列下拉式選單要加上捲軸,避免選單過長被畫面切掉,第二層的下拉式選單已經有加好卷軸了沒有問題,但是第一層的下拉選單我就不知道要怎麼做,主要是overflow-y這個屬性一加上以後因為導覽其實本來是ul li直向排列的,用display屬性把它變成橫向overflow-y:auto加上去發現x方向也會出現卷軸,都不知道要怎麼改,誰可以教我第一層下拉選單加上卷軸要怎麼做才好呢,謝謝。下拉式選單參考網站,產品介紹的威士忌就有卷軸
https://web.hocom.tw/h/index?key=222812352672
...<div class='locked'><em>瀏覽完整內容,請先 <a href='member.php?mod=register'>註冊</a> 或 <a href='javascript:;' onclick="lsSubmit()">登入會員</a></em></div><div></div> Hello :
參考:h[--]ttp://help.dottoro.com/ljcdtehj.php
他有提到:
width: 200px;
height: 50px;
有沒有可能是你的 width 像素不夠。。。
<head>
<style>
.example {
overflow-y: scroll;
background-color: #F9F9F9;
width: 200px;
height: 50px;
}
</style>
</head>
<body>
<div class="example">
The overflow-y property determines what to do with the
vertical content outside the element's rendering area.
</div>
</body>...<div class='locked'><em>瀏覽完整內容,請先 <a href='member.php?mod=register'>註冊</a> 或 <a href='javascript:;' onclick="lsSubmit()">登入會員</a></em></div> gonewang123 發表於 2020-3-11 11:57 PM static/image/common/back.gif
Hello :
參考:h[--]ttp://help.dottoro.com/ljcdtehj.php
跟那沒有關係,是因為<ul><li>設定overflow-y有包含內層的內容 Hi :
雖然我不見的知道答案。
不過我可以肯定一件事情是。。。
也許你將你的code 跟run的結果,放在某個地方讓人參考一下
也許會比較有方向。。。
不過,當然在不一定有答案,且要先把自己的一些"內容"公開
是需要考量過的。。。
FYI 我改成用直立式的方式,所以現在這個問題已經解決了,謝謝大家<br><br><br><br><br><div></div>
頁:
[1]