html / js中的从右到左和/或从上到下的文本? [英] Right-to-left and/or up-to-bottom text in html/js?

查看:868
本文介绍了html / js中的从右到左和/或从上到下的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在浏览器中为用户输入创建一个从右到左和从上到下的文本字段?有什么本地方式吗?或者解决方法?

How can I make a right-to-left and up-to-bottom textfield for user input in a browser? Are there any native ways to do it? Or maybe workarounds?

(可以像日文或象形文字一样。)

(Up-to-bottom could be like Japanese, or the hieroglyphs.)

推荐答案

对于RTL文本字段,可以使用HTML dir 属性(如ŠimeVidas已经提到的) c> dir =RTL 方向属性中使用 direction:rtl 。您可以在大多数可视HTML元素上使用这些属性,而不仅仅是文本字段。

For RTL text field, you can use the HTML dir attribute (like Šime Vidas has already mentioned) or the with dir="RTL" direction attribute in CSS with direction: rtl. You can use these properties on most visual HTML elements, not just on text fields.

对于从上到下的方向,没有一个简单的标准方法,我知道的,但是没关系,因为日本网页很少使用没有嵌入图像或Flash对象的垂直文本,我从来没有见过任何网站使用垂直输入。事实上,即使在HTML之外,日语计算机中的垂直输入也极少出现,并且通常仅在产生打印的垂直文本的WSIWYG编辑器(例如Word处理器)中找到。

As for top-to-bottom direction, there's no easy standard method that I am aware of, but that's OK, since Japanese web pages rarely use vertical text that's not embedded in images or Flash objects, and I've never seen any site using vertical input. In fact, vertical input in Japanese computers is rare extremely rare even outside of HTML, and is usually found only in WSIWYG editors (such as Word Processors) that produce printed vertical text.

这篇关于html / js中的从右到左和/或从上到下的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆