RTL bulma css navbar

时间:2017-09-11 23:43:26

标签: css right-to-left bulma

好吧,我正在尝试为我的网站中的RTL用户添加选项。我正在使用bulma(V 0.5.2),其中大部分(rtl)开箱即用,在body标签上有一个简单的// This file configures the development web server // which supports hot reloading and synchronized testing. // Require Browsersync along with webpack and middleware for it import browserSync from 'browser-sync'; // Required for react-router browserHistory // see https://github.com/BrowserSync/browser-sync/issues/204#issuecomment-102623643 import historyApiFallback from 'connect-history-api-fallback'; import webpack from 'webpack'; import webpackDevMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; import config from '../webpack.config.dev'; import proxy from 'http-proxy-middleware'; const bundler = webpack(config); const serverProxy = proxy('/api', { target: "http://0.0.0.0:8050", changeOrigin: true, // set true for hosted sites logLevel: 'debug' }); // Run Browsersync and use middleware for Hot Module Replacement browserSync({ port: 3000, ui: { port: 3001 }, server: { baseDir: 'src', middleware: [ historyApiFallback(), // The order of serverProxy is important. It will not work if it is indexed // after the webpackDevMiddleware in this array. serverProxy, webpackDevMiddleware(bundler, { // Dev middleware can't access config, so we provide publicPath publicPath: config.output.publicPath, // These settings suppress noisy webpack output so only errors are displayed to the console. noInfo: true, quiet: false, stats: { assets: false, colors: true, version: false, hash: false, timings: false, chunks: false, chunkModules: false } // for other settings see // https://webpack.js.org/guides/development/#using-webpack-dev-middleware }), // bundler should be the same as above webpackHotMiddleware(bundler), ] }, // no need to watch '*.js' here, webpack will take care of it for us, // including full page reloads if HMR won't work files: [ 'src/*.html' ] }); 。但导航栏很有趣,我需要你的帮助。如何使其与RTL一起正常工作?

This is what it looks like on desktop with rtl

And on mobile its like this

感谢。

1 个答案:

答案 0 :(得分:1)

好吧,我已经通过在代码中挖掘一下并理解应该在oreder中更改它以使其作为RTL导航栏正常工作来解决它。

我们在导航栏中有三个主要部分,我建议您在app.css中创建一个类,或者为您的css rtl-navbar创建一个类,并将其应用于navbar-burger,{ {1}}。除此之外,您应该在主导航栏容器上应用navbar-end

direction:rtl