对CSS和Html的建议 [英] Advice on css and Html

查看:91
本文介绍了对CSS和Html的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些关于css和styles的建议,不是一个容易提出的问题,



我正在开发一个将会在一些语言,我知道如何管理字典,至少现在是这样,但我遇到了一个更大的问题......



这个页面将会是英文的,还有日语和希伯来语,他们有不同的风格,就像他们在一些页面中从右到左看的一样。



我该如何管理?我正在考虑使用模板,但是做起来不那么容易,另一种选择是再次使用它。



有一些方法可以使用css来反转视图,就像右边的第一个按钮和徽标,等等?



感谢和抱歉我的英文。

解决方案

在标记中为需要使用的语言指定< html dir =rtl> 左支持。您可能可以制作所有语言(键)和方向(值)的映射。然后基于语言,为 html 元素指定方向。



我会读: http://www.w3.org/International/tutorials/bidi-xhtml/



如果由于某种原因,您需要在某个元素上左右移动,只需在其中指定dir属性:< div dir =ltr < / div>



另外,您可以在 body html 元素,具体取决于方向。在此基础上,你可以,例如,如果你需要将事物向右或向左移动即可。

  body #foo {float:left; } 
body.right-to-left div#foo {float:right; }


I need some advice on css and styles, is not an easy question to ask,

I'm on the way to develop a project that's going to be in a few languages, I know how to manage the dictionaries, at least for now, but I was with a bigger issue ...

The page it's going to be on english, and also japanese and hebrew, they have a different style like they watch and read from right to left in some pages.

How can I manage this? I was thinking on using templates, but is not that easy to do that, the other option was doing it again.

There is some way to work with css to invert the view, like the first button on the right and the logo, and so on?

Thanks and sorry for my english.

解决方案

Try specifying <html dir="rtl"> in your markup for the languages that do need right to left support. You can probably make a mapping of all the languages ( keys ) and the directions ( values ). Then based on the language, specify the direction for the html element.

I would read: http://www.w3.org/International/tutorials/bidi-xhtml/

If for some reason you need left to right on a certain element, just specify the dir attribute on it: <div dir="ltr"></div>

In addition you can probably set a class on the body or html element depending on the direction. And based on that, you can either, for example float things right or left if you need to..

body #foo { float: left; }
body.right-to-left div#foo { float:right; }

这篇关于对CSS和Html的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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