我想在文本的左侧创建水平线。我有这样的想法,但它在两侧创建线,但我只想要一侧 - 左侧或右侧。我怎样才能做到这一点?
h2 {
width: 100%;
text-align: center;
border-bottom: 1px solid #000;
line-height: 0.1em;
margin: 10px 0 20px;
}
h2 span {
background: #fff;
padding: 0 10px;
}
Run Code Online (Sandbox Code Playgroud)
我从 Symfony 的旅程开始。
在这一点上,我试图保护我的身份验证路由(我正在使用 FOSUserBundle),所以我这样做:
access_control:
- { path: ^/logowanie$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/rejestracja, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetowanie-hasla, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/backstage/, role: ROLE_ADMIN }
- { path: ^/profile/, role: ROLE_USER }
Run Code Online (Sandbox Code Playgroud)
但是,无论是否登录,我都可以访问这些路线。
我的坏在哪里?
# To get started with security, check out the documentation:
# https://symfony.com/doc/current/security.html
security:
encoders:
FOS\UserBundle\Model\UserInterface: bcrypt
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
check_path: fos_user_security_check
login_path: …Run Code Online (Sandbox Code Playgroud) 我尝试将带有缩略图的 swiper 库添加到引导模式,但在模式中它不起作用,为什么?(我直接使用文档中的滑块代码)
这是演示: http: //codepen.io/vertisan/pen/MyBdKz
模态:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
<div class="swiper-container gallery-top">
<div class="swiper-wrapper">
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/1200/1200/nature/1)"></div>
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/1200/1200/nature/2)"></div>
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/1200/1200/nature/3)"></div>
</div>
</div>
<div class="swiper-container gallery-thumbs">
<div class="swiper-wrapper">
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/400/400/nature/1)"></div>
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/400/400/nature/2)"></div>
<div class="swiper-slide" style="background-image:url(http://lorempixel.com/400/400/nature/3)"></div>
</div>
</div>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
JS:
var galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10, …Run Code Online (Sandbox Code Playgroud)