如何解决在Rails 6中:视差在开发中起作用,但在生产中不起作用
以下代码在开发中有效,但不能在生产中使用,我很茫然。我目前正在使用capistrano将生产部署到AWS:
+1
图像 Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TASK
| Intent.FLAG_ACTIVITY_NEW_TASK);
Log.D(LOG_TAG,"finishAndRestartApp() -> creating pending intent");
PendingIntent pendingIntent = PendingIntent.getActivity(this.getBaseContext(),intent,PendingIntent.FLAG_ONE_SHOT);
AlarmManager mgr = (AlarmManager) this.getBaseContext().getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC,System.currentTimeMillis() + 100,pendingIntent);
Log.D(LOG_TAG,start finishing mainActivity AND RESTART IT");
finish();
在正确的目录.container_parallax {
text-align: center;
background-image:url(background1.jpg);
background-repeat:no-repeat;
background-size:cover;
background-attachment: fixed;
font-family:helvetica,arial,sans-serif;
line-height:20px;
min-height: 90vh;
}
中。
在此先感谢您的帮助!
解决方法
我通过进行以下更改background-image: asset-url('background1.jpg');
解决了该问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。