源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> <style> div.ex1 { direction: rtl; } </style> </head> <body> <div>这是默认的文本方向.</div> <div class="ex1">这是从右向左的文本方向.</div> </body> </html>
运行结果