从右向左布局(RTL Layout)


Framework7 完全支持从右向左的语言。你只需要增加一个额外的CSS文件即可:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. ...
  5. <title>My App</title>
  6. <!-- Path to Framework7 Library CSS-->
  7. <link rel="stylesheet" href="path/to/framework7.[theme].min.css">
  8. <!-- Enable RTL by including additional RTL styles: -->
  9. <link rel="stylesheet" href="path/to/framework7.[theme].rtl.min.css">
  10. <!-- Path to your custom app styles-->
  11. <link rel="stylesheet" href="path/to/my-app.css">
  12. ...

Where [theme] is the theme you use: ios or material

注意,从右向左布局全部通过CSS来实现,你不需要修改HTML结构。