![](/img/trans.png)
[英]How to center (horizontal and vertical) text along an textPath inside an arc using d3.js?
[英]Horizontal and Vertical navigation inside div using arrows along and down the text
我有一個多行(多於一行)文本的 HTML div 。 我需要使用鍵盤箭頭(向上、向下、向左、向右)啟用水平和垂直導航,就像在 html 輸入字段(文本區域、文本)中沿着文本或向下行一樣。
<div id='enabled_arrow_navigation'>
Horizontal and Vertical navigation inside, div using arrows along and down the text,
Horizontal and Vertical navigation inside div using arrows along and down the text
Horizontal and Vertical navigation inside div using arrows along and down the text
</div>
我試過波紋管代碼但它不工作
$("#enabled_arrow_navigation").keyup(function(e)
{
if (e.keyCode == 40)
{
Navigate(1);
}
if(e.keyCode==38)
{
Navigate(-1);
}
});
您可以通過將 contenteditable 屬性添加到 true 來使 div 可編輯
<div id='enabled_arrow_navigation' contenteditable='true'> Horizontal and Vertical navigation inside, div using arrows along and down the text, Horizontal and Vertical navigation inside div using arrows along and down the text Horizontal and Vertical navigation inside div using arrows along and down the text </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.