首页 \ 问答 \ 从ios中的epub获取封面图片(fetch Cover Image from epub in ios)

从ios中的epub获取封面图片(fetch Cover Image from epub in ios)

我想在阅读表中显示epub文件的书籍封面图像。 在我的iOS应用程序中,我为epub文件添加了“Open In”支持。 因此,当我导航到我的书阅读应用程序时,我想首先在书架上显示书籍的封面图像然后想要加载该书。 请帮我从ios app中的epub book中获取封面图片。


I want to display Book Cover Image of epub file in my Reading table. In my iOS application I have added "Open In" support for epub files. So when i navigate to my book reading app I want to show book's cover image in shelf first and then want to load that book. Please help me to fetch Cover Image from epub book in ios app.


原文:https://stackoverflow.com/questions/34545838
更新时间:2023-08-31 22:08

最满意答案

您可以将col-sm-6更改为col-xs-6 (它将适用于x小屏幕和小屏幕)

然后删除col-lg-4因为它不需要(类col-md-4适用于从中等到所有更大的尺寸,除非另有说明)

完成后,你可以简单地在最后一列添加一个偏移量,如下所示: class="col-xs-6 col-xs-offset-3 col-md-4 col-md-offset-0"

基本上,如果xs偏移3列(然后将其居中),它将删除中等或更高屏幕的偏移量。

见下面的演示

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<div class="row">
  <div class="col-xs-6 col-md-4">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="rehab" />
      <figcaption class="figcaption"><a href="serviços.html">Reabilitação Vestibular</a>
      </figcaption>
    </figure>
  </div>
  <div class="col-xs-6 col-md-4">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="drenagem" />
      <figcaption class="figcaption"><a href="serviços.html">Fisioterapia Estética</a>
      </figcaption>
    </figure>
  </div>
  <div class="col-xs-6 col-xs-offset-3 col-md-4 col-md-offset-0">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="traumato-ortopédica" />
      <figcaption class="figcaption"><a href="serviços.html">Fisioterapia Traumato-Ortopédica</a>
      </figcaption>
    </figure>
  </div>
</div>


You can change col-sm-6 to col-xs-6 (it will apply to x-small and small screens)

Then remove the col-lg-4 as it is not needed (the class col-md-4 applies from medium to all bigger sizes, unless specified differently)

Having done that, you can simply add an offset to the last column like this: class="col-xs-6 col-xs-offset-3 col-md-4 col-md-offset-0"

Basically, if xs offset it by 3 columns (which then centers it) and it removes the offset for medium or higher screens.

See demo below

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<div class="row">
  <div class="col-xs-6 col-md-4">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="rehab" />
      <figcaption class="figcaption"><a href="serviços.html">Reabilitação Vestibular</a>
      </figcaption>
    </figure>
  </div>
  <div class="col-xs-6 col-md-4">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="drenagem" />
      <figcaption class="figcaption"><a href="serviços.html">Fisioterapia Estética</a>
      </figcaption>
    </figure>
  </div>
  <div class="col-xs-6 col-xs-offset-3 col-md-4 col-md-offset-0">
    <figure class="box-1">
      <img class="services-imgs" src="http://lorempixel.com/300/300" alt="traumato-ortopédica" />
      <figcaption class="figcaption"><a href="serviços.html">Fisioterapia Traumato-Ortopédica</a>
      </figcaption>
    </figure>
  </div>
</div>

相关问答

更多
  • 让我们试试Bootstrap。 我们只需要一行六格。 这是因为Bootstrap 会将多余的单元格包装到新的行中 。 类col-xs-6的块从12列中取6。 它恰好是屏幕宽度的一半。 这个课程的作品,直到一个更宽的屏幕的条件开始行动。 当屏幕宽度为992px或更宽时,类col-sm-4的块占用屏幕宽度的三分之一。 请检查结果。
    根据所需顺序制作另一个网格,以获得额外的小屏幕,并使用Bootstrap的响应式实用程序显示/隐藏两个网格。 例如:
    您不需要将它们分成多行 - 只需在它们周围放置一个单行元素就可以解决填充问题。 只有两个col-sm-6列彼此相邻的空间,所以无论如何,以下两col-sm-6将成对出现。 (列可能有一些额外的顶部/底部边距,或者 - 外部行的填充可能需要添加才能看起来很好。) You don't need to divide them up into multiple rows - just putting one single row element around them should take care of the ...
  • 您需要将两个1组合在一列中,而不是连续使用1,2和3。 所以这样的事情:
    Rather than having 1, 2, and 3 in a row, you'll need to put both 1s together in a column. ...
  • 我不认为你应该嵌套行。 此外,您应该将行放在容器中。 (另请参阅: Bootstrap 3 Grid,我需要一个容器吗? ) 以下代码似乎可以解决问题: .fix-result {padding-right:20px;border: 1px solid #0359cf; margin-bottom:20px;} .fix-result-info { color: #0359cf;text-transform: uppercase; text-align: center;} .fix-result .ma ...
  • 如果要像图像一样进行设计,则必须遵循以下说明: ------------:------------------- ----------------- ------------------------------- |
    | TEXT | | Middle Div | | Text |
    | -------------------------------- ----------------- --------------- ...
  • 你有不需要的结束div。
    布局本身很容易获得。 这里的问题是您希望图像在不同的屏幕尺寸和布局上如何? 你想要他们裁剪...... #my_section .row>[class^=col-] { height: 50vh; } #my_section .row>[class^=col-] { background: transparent center center no-repeat; background-size: cover; }
    您可以将col-sm-6更改为col-xs-6 (它将适用于x小屏幕和小屏幕) 然后删除col-lg-4因为它不需要(类col-md-4适用于从中等到所有更大的尺寸,除非另有说明) 完成后,你可以简单地在最后一列添加一个偏移量,如下所示: class="col-xs-6 col-xs-offset-3 col-md-4 col-md-offset-0" 基本上,如果xs偏移3列(然后将其居中),它将删除中等或更高屏幕的偏移量。 见下面的演示