请问 .register-page 这个是怎么来的?

我是新手。这是在给验证码添加样式的时候。
这是属于bootstrap知识吗?

/ User register page /
.register-page {
img.captcha {
cursor: pointer;
border: 1px solid #ced4da;
border-radius: 4px;
padding: 3px;
}
}

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 1

layouts/app.blade.php 中有一段是

<div id="app" class={{route_class()}}-page>

其中 route_class() 这个方法是自定义的,写在 app/helpers.php 这个文件中

.
.
.
if (!function_exists('route_class')) {
    function route_class()
    {
        return str_replace('.', '-', Route::currentRouteName());
    }
}

Route::currentRouteName()获取到的是当前路由的名字。所以 .register-page 这个选择器获取到的就是路由名为register的页面的 ID 为 appdiv

file

4年前 评论
bing_ (楼主) 4年前

layouts/app.blade.php 中有一段是

<div id="app" class={{route_class()}}-page>

其中 route_class() 这个方法是自定义的,写在 app/helpers.php 这个文件中

.
.
.
if (!function_exists('route_class')) {
    function route_class()
    {
        return str_replace('.', '-', Route::currentRouteName());
    }
}

Route::currentRouteName()获取到的是当前路由的名字。所以 .register-page 这个选择器获取到的就是路由名为register的页面的 ID 为 appdiv

file

4年前 评论
bing_ (楼主) 4年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!