I view my page source and find these
</script><script src="/assets/717f72d7/jquery.js"></script>
<script src="/assets/b02571ea/yii.js"></script>
<script src="/assets/b02571ea/yii.validation.js"></script>
<script src="/assets/b02571ea/yii.activeForm.js"></script>
<script src="/assets/db3e6b0f/js/bootstrap.js"></script>
And I find out about AppAsset.php
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
but I still dont understand
-
what make the css/site.css stay all the way at the top of the page. If I want the css/site.css stay below the bootstrap.js, how do I do that?
-
the order of the js files are loaded (e.g. jquery first, then yii.js , bootstrap last ). Is it because Yii\web\YiiAsset is above yii\bootstrap\BoostrapAsset ?
-
yii\web\YiiAsset add jquery.js and yii.js | BootstrapAsset add bootstrap.js , then what add the yii.validation.js and yii.activeform.js ?
Thanks