在Ken Wheeler的Slick轮播中,我希望背景图像的移动细节视图与台式机不同。为此,我已经对Overrides tt_content.php进行了必要的添加。
'cropVariants' => [
'desktop' => [
'title' => 'desktop',
'allowedAspectRatios' => [
'3:2' => [
'title' => 'Slick 3:2',
'value' => 3 / 2
],
'16:9' => [
'title' => 'Slick 16:9',
'value' => 16 / 9
],
'21:9' => [
'title' => 'Slick 21:9',
'value' => 21 / 9
],
'NaN' => [
'title' => 'Free',
'value' => 0.0
],
],
'selectedRatio' => 'NaN',
],
'mobile' => [
'title' => 'mobile',
'allowedAspectRatios' => [
'3:2' => [
'title' => 'Slick 3:2',
'value' => 3 / 2
],
'16:9' => [
'title' => 'Slick 16:9',
'value' => 16 / 9
],
'21:9' => [
'title' => 'Slick 21:9',
'value' => 21 / 9
],
'NaN' => [
'title' => 'Free',
'value' => 0.0
],
],
'selectedRatio' => 'NaN',
],
]
此操作的经验是:可以轻松更改Desktop的图像部分并正确输出。移动设备有点不同。我可以根据需要选择框架,它始终显示桌面视图。是事实,您不能将其更改为移动设备,还是我没有考虑什么?
非常感谢您的所有提示和问候