简体   繁体   English

边框半径和框阴影未按预期工作

[英]border-radius and box-shadow not working as expected

I am using bootstrap-vue in my project and I am using the responsive grid.我在我的项目中使用 bootstrap-vue,并且我使用的是响应式网格。 I have used different cols sizes for different view points.我为不同的观点使用了不同的 cols 大小。 I am having a issue to add background, border-radius and box-shadow to the content of the <b-row> , since width of the <b-row> is more than the width of all columns.我在向<b-row>的内容添加背景、边框半径和框阴影时遇到问题,因为<b-row>的宽度大于所有列的宽度。 So I add the background for each column and its working fine (I am not sure its the correct way to do it).所以我为每一列添加了背景,它的工作正常(我不确定它的正确方法)。 I used the same method to add the border-radius.我使用相同的方法添加边框半径。 Its working fine in until cols get stacked each other in small devices.它工作正常,直到cols在小型设备中相互堆叠。 I couldn't make box-shadow working for any device size.我无法让 box-shadow 适用于任何设备尺寸。 Is there any way I can wrap the content inside the <b-row> and add border-radius and box-shadow and the background to the wrapper.有什么方法可以将内容包装在<b-row>中,并将边框半径和框阴影以及背景添加到包装器中。

example https://codesandbox.io/s/intelligent-goldstine-wwpng?file=/src/components/HelloWorld.vue例如https://codesandbox.io/s/intelligent-goldstine-wwpng?file=/src/components/HelloWorld.vue

You need to use @media query to resolve your issue.您需要使用@media query来解决您的问题。 and I suggest avoid to use inline style.我建议避免使用内联样式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM