使用bootstrap在侧面添加图像

时间:2017-04-27 09:37:43

标签: twitter-bootstrap

我想在div的一侧添加两个图像如何使用bootstrap

执行此操作
import org.apache.catalina.valves.AccessLogValve;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Application implements EmbeddedServletContainerCustomizer {

    @Override
    public void customize(ConfigurableEmbeddedServletContainer container) {
        if (container instanceof TomcatEmbeddedServletContainerFactory) {
            TomcatEmbeddedServletContainerFactory factory = (TomcatEmbeddedServletContainerFactory) container;
            AccessLogValve accessLogValve = new AccessLogValve();
            accessLogValve.setEnabled(true);
            accessLogValve.setPattern("common");
            accessLogValve.setDirectory("/log/");
            accessLogValve.setPrefix("access");
            accessLogValve.setSuffix(".log");
            accessLogValve.setRotatable(false);
            factory.addContextValves(accessLogValve);
        }
    }
}

但是当我插入图像时,这是输出get enter image description here

但我希望它在一边而不是顶部在那里我可以使用bootstrap

来做到这一点

1 个答案:

答案 0 :(得分:-1)

    <div class="row">
     <div class="col-sm-4">
                <asp:Image ID="guitar" runat="server" Height="187px" 
                    ImageUrl="~/images/drum.jpg" Width="239px" />
    </div>

                <div class="col-sm-4">
                         <h2>HEADING</h2>

                        <p>testtetstesttetstesttetstesttetstesttets
                            <br>ftesttetstesttetstesttets
                            <br>testtetstesttetstesttetstesttetstesttets
                            <br>testtetstesttetstesttets
                            <br>testtetstesttetstesttetstesttets.</p>
                        <p><a href="#" class="btn btn-primary" role="button">More..</a>
                        </p>

                </div>
              <div class="col-sm-4"><!-- for right hand side content--></div>
            </div>

这段代码对我有用