问题
I know that there is some standards from w3.org. However this is just a thought.
Instead of using "dir" in html and body tag, can I use below custom attribute to identify layout?
Actual: <html dir="rtl">
My: <html layout="rtl">
After identifying Layout from above Tag, Is that suggested to use below line of code in css?
Code:
html[layout="rtl"] .heading-main , .title, .content {
direction: rtl !important;
text-align: right !important;
}
So that, I can add desired css code to selected elements to make my react App compatible with Arabic language.
来源:https://stackoverflow.com/questions/50597254/can-i-use-below-code-html-css-to-make-my-website-compatible-with-rtl