-webkit-box-orient无效
![源码被猫吃了](https://picx.zhimg.com/v2-59529cc1eda329996bf8b16551215cc2_l.jpg?source=172ae18b)
源码被猫吃了
![](https://pic1.zhimg.com/v2-4812630bc27d642f7cafcd6cdeca3d7a.jpg?source=88ceefae)
努力成为编程领域的专业选手 : )
大家好,我是源码被猫吃了。
问题描述
通过将 -webkit-box-orient 属性写为类的样式,在通过打包工具打包后发现该样式并没有生效。查阅资料后发现是启动了 autoprefixer。
<p class="content">Hello World!</p>
// CSS 部分
.content {
-webkit-box-orient: vertical;
}
解决方案
方法一:
将 -webkit-box-orient 样式写为内联样式,如下面所示。
<p class="content" style="-webkit-box-orient: vertical">Hello World!</p>
方法二:
关闭 autoprefixer.
<p class="content">Hello World!</p>