我正在使用twitter boostrap为用户个人资料制作圆形图像。我已将img-circle类添加到我的img标签中。但是它仍然给我一个矩形图像。我怎么能解决这个问题?
@extends('main')
@section('content')
<h1>This is show.blade.php</h1>
@if(isset($info))
<div class='container-fluid text-center'>
<div class='row col-md-5' style='border:1px solid black;'>
<div class='col-md-2 col-md-offset-2'>
{!!Html::image('uploads/cat.jpg','',array('class'=>'img-circle','style'=>'width:150px;height:150px;'))!!}
</div>
<div class='col-md-12'>
<span>user id :</span><span>{{$info['info']['id']}}</span></br>
<span>username :</span><span>{{$info['info']['username']}}</span></br>
</div>
</div>
</div>
@endif
@endsection
答案 0 :(得分:0)
您的代码很好,看起来好像没有加载Bootstrap。
将其添加到主模板:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
答案 1 :(得分:0)
请改用:
<img src="{{url('uploads/cat.jpg')}}" class="img-circle" style="width:150px;height:150px;" />
基本上创建元素,然后在src
属性