-3

什么会使链接在引导程序中无响应?我的链接不会在我的页面中切换,因为它们会实时切换。有任何想法吗 ?

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
   <nav class="navbar navbar-dark bg-dark navbar-expand-sm">
  <div class="container ">
	  <a class="navbar-brand d-none d-sm-inline-block fixed-top" href="#">Larry J designs</a>
    <ul class="navbar-nav ">
		<li class="nav-item "><a class ="nav-link active" href="index.html">Home</a></li>
		<li class="nav-item"> <a class ="nav-link " href="about.html">About</a></li>
		<li class="nav-item"> <a class ="nav-link" href="portfolio.html">Portfolio</a></li>
		<li class="nav-item">  <a class ="nav-link" href="services.html">Services</a></li>
	   </ul>
	  <div class="clearfix">
	  
	  <ul class="navbar-nav ">
		<li class="nav-item "><a class ="nav-link active" href="index.html">Home</a></li>
		<li class="nav-item"> <a class ="nav-link " href="about.html">About</a></li>
		<li class="nav-item"> <a class ="nav-link" href="portfolio.html">Portfolio</a></li>
		<li class="nav-item">  <a class ="nav-link" href="services.html">Services</a></li>
	   </ul>
	  </div>
	   </div>
	 
	  </nav>
    <!-- navbar-nav -->
	
		<div class="container">
	<section class="container" id ="mainpage">
		<div class ="row">
			<article class="col-8" id="bio">
				<h1>Welcome to  Larry J designs  </h1>
				 <p class="justify-content-center">Hello, I'm Larry J , I currently live in the DC Metro area , I also love working on art in my spare time. As a teen in high I use to love to draw and build websites , Currently, I work a full time job like most , however in my spare time I love working on learning web design and drawing . Life has a long road to success , but on the road there are that you have to learn to get to the next level. </p></article>
			<section class="col-sm-4">
		<div class="row no-gutters">
			<div class="col"><img src="about-thumbnail-placeholder.png" alt="larryphoto
				" class="img-thumbnail">
			</div>
			
			
	</div>
			</section>
				</div>
      </section>
    
  



		
   </div>


 <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  </body>
</html>

4

2 回答 2

0

首先,您应该注意,non responsive在代码世界中它具有不同的含义,不仅仅是简单的“不工作”定义,还意味着布局将适应并响应设备和浏览器的大小,即Responsive Design.

我相信您的问题是由于标题与其他链接重叠,阻止它们与鼠标交互,只有标题会交互。Inspect您可以使用链接上的右键单击选项查看 Chrome 的开发工具。发生这种情况是因为标题<a>有一个fixed-top类。删除它可以解决问题。

从:

<a class="navbar-brand d-none d-sm-inline-block fixed-top" href="#">Larry J designs</a>

至:

<a class="navbar-brand d-none d-sm-inline-block" href="#">Larry J designs</a>

我强烈建议您阅读Bootstrap 4 文档,以掌握并了解一切是如何工作的,以及如果您试图修复导航,如何使用固定顶类。此外,查看示例并检查他们的代码帮助。

于 2018-11-12T22:36:49.803 回答
0

您没有使用行或列,这将对 Bootstrap 的响应能力产生重大影响。

您需要查看 Bootstrap Grid 系统,我建议您通读此页面并将这些实践应用于您的代码: https ://getbootstrap.com/docs/4.0/layout/grid/

于 2018-11-09T15:46:33.113 回答