在移动设备或特定分辨率下添加
标签(add
tags at mobile or under specific resolutions)

我想为移动视图分辨率添加br标签,如320px - 480px。 我试过保证金顶部,底部但不起作用。 所以请帮助我。

我想在这两个锚标签之间添加br标签。 下面两个像这样的标签。

<a class="ww" href="counseller.html">Career Counsellor</a> 
<a class="xx" href="mentors.html"> Career Mentor</a>


I want to add br tag for mobile view resolution like 320px - 480px. I have tried margin top , bottom but not working. So please help me.

I want add br tag in between these two anchor tag. following two a tag like this.

<a class="ww" href="counseller.html">Career Counsellor</a> 
<a class="xx" href="mentors.html"> Career Mentor</a>


原文:https://stackoverflow.com/questions/32901604
2024-04-23 20:04

满意答案

您是否考虑过将数据存储在数组中,并根据需要从rand提取?

friends = ["Joe", "Sam", "Tom"]
ary =[(1..5), (6..10), (11..20)]
year = (1..3)
friends.each do |friend|
  year.each do |yr|
    p "#{friend} at the end of year #{yr} wrote #{rand(ary[yr - 1])} essays"
  end
end

这会产生,例如:

"Joe at the end of year 1 wrote 5 essays"
"Joe at the end of year 2 wrote 7 essays"
"Joe at the end of year 3 wrote 16 essays"
"Sam at the end of year 1 wrote 3 essays"
"Sam at the end of year 2 wrote 7 essays"
"Sam at the end of year 3 wrote 18 essays"
"Tom at the end of year 1 wrote 2 essays"
"Tom at the end of year 2 wrote 8 essays"
"Tom at the end of year 3 wrote 15 essays"

Have you considered storing the ranges in an array, and drawing from rand on demand?

friends = ["Joe", "Sam", "Tom"]
ary =[(1..5), (6..10), (11..20)]
year = (1..3)
friends.each do |friend|
  year.each do |yr|
    p "#{friend} at the end of year #{yr} wrote #{rand(ary[yr - 1])} essays"
  end
end

This produces, for example:

"Joe at the end of year 1 wrote 5 essays"
"Joe at the end of year 2 wrote 7 essays"
"Joe at the end of year 3 wrote 16 essays"
"Sam at the end of year 1 wrote 3 essays"
"Sam at the end of year 2 wrote 7 essays"
"Sam at the end of year 3 wrote 18 essays"
"Tom at the end of year 1 wrote 2 essays"
"Tom at the end of year 2 wrote 8 essays"
"Tom at the end of year 3 wrote 15 essays"

相关问答

更多

追加在For循环中不起作用(Append does not work in For Loop)

关键是,非常简单,您的循环尚未执行。 您可以添加要检查的输出。 first_sale_all_menu = [] for one_product_category in Product_Category.objects.all().filter(slug__in=('3-pack-items-c', '3-pack-items-b', '3-pack-items', '3-pack-items-d')): print(1) link_to_mamapedi...

两个循环嵌套在x86程序集的另一个循环中(Two loops nested inside another loop in x86 assembly)

那样的? L2: PUSH CX ;PUSH CX IN A STACK ; insert this MOV CX, 10 ; width of your tree = 10 SUB CX, BX ; subtract length of "s" string SHR CX, 1 ; divide CX by 2 => number of spaces at the beginning JCXZ e...

虽然循环不起作用(While loop doesn't work)

尝试: while ( $row = mysql_fetch_array ( $r ) ) 您希望将$row设置$row等于mysql_fetch_array的结果,而不是将其与结果进行比较 Try: while ( $row = mysql_fetch_array ( $r ) ) You want to set $row equal to the result of mysql_fetch_array, not compare it against the result

if语句在for循环内部循环时不起作用(if statement does not work inside while loop which is inside for loop)

使用http://php.net/manual/en/language.variables.variable.php而不是一些丑陋的eval() 。 (例如${"district$count"} ) $count = 0; do { $count++; $district_name = $districts_filter_row['district_name']; $district_value = $districts_filter_row['district_value...

R:if语句嵌套在for循环中不起作用(R: if statement nested in a for loop doesn't work)

使用ifelse() ,而不是if ... else 。 Use ifelse(), not if ... else.

如何在PHP循环中查询rand的结果?(How to query the result of rand in a php loop?)

您提交的代码的主要问题是,如果您的随机选取的数字不是50,则将0赋值给它。 所以你的输出将是一个0流。 你可以稍微修改你的代码,并删除你的else块: <?php $number = null; while ($number != 50) { $number = rand(0, 100); echo $number . "\n"; if ($number == 50) echo "It's 50!"; } 或者,直到你打出你的号码,然后爆发。 <?php ...

为什么我的循环不起作用?(Why wont my loop work?)

您可以使用基于区间的解决方案,而不是像使用while循环一样 console.log('START LOOP MY FUNCTION'); //start the function loop(function () { //this callback will be called once `a` becomes 1 console.log('EXIT LOOP MY FUNCTION'); }) function loop(callback) { var a = 1, ...

嵌套的forEach循环不起作用(Nested forEach loop does not work)

您没有在entry对象中定位数组,您需要遍历childNodes属性以获取所需的数据。 见下面的例子。 var dataModels = []; dataModels[0] = { childNodes: [] }; dataModels[0].childNodes[0] = { appId: "foo" }; dataModels.forEach(function(entry){ entry.childNodes.forEach(function(children...

rand()在循环条件下的行为(The behavior of rand() within a loop condition)

在每次迭代之前完全评估条件。 (想一想:编译器如何知道每次评估哪些部分,以及哪些部分不评估?) 是否是不好的做法取决于具体情况。 如果终止条件可能在循环期间发生变化,则有意义。 如果你想循环一个随机的次数,那么你应该预先评估终止价值,否则你会得到一个比你想象的不同的随机分布。 如果在每次迭代时评估rand() ,则满足终止条件的几率将根据i的值改变每次迭代,并且与均匀分布相比,您会发现i一些终止值过度表示。 话虽如此,在你的情况下,即使你提前评估,分布也不会是统一的,因为(1) rand()不能保...

为什么在嵌套在另一个循环中的每个循环内部rand不起作用(Why rand inside an each loop nested in another each loop does not work)

您是否考虑过将数据存储在数组中,并根据需要从rand提取? friends = ["Joe", "Sam", "Tom"] ary =[(1..5), (6..10), (11..20)] year = (1..3) friends.each do |friend| year.each do |yr| p "#{friend} at the end of year #{yr} wrote #{rand(ary[yr - 1])} essays" end end 这会产生,例如: ...

相关文章

更多

jQuery Mobile 的特性

jQuery Mobile 是一个基于 jQuery 的网页前端界面框架,它继承了 jQuery 轻量 ...

jquery mobile 官网下载

jquery mobile官方网址:http://jquerymobile.com/ jquery m ...

AMF: ASP.NET Mobile Framework

ASP.NET移动框架(AMF)是一种最常用的平板电脑和智能手机上Web应用程序的框架,基于jQuer ...

使用jQuery Mobile实现通讯录

jQuery Mobile 通讯录 拨打电话 作者:方倍工作室 地址: &lt;!DOCTYPE ...

服务器端通过http请求区分是mobile还是pc

近来在开发一个基于手机上网的项目。遇到的第一件事情就是,该项目需要同时支持手机和PC。详细的说:当pc ...

【原创】小白学jquery Mobile《构建跨平台APP:jQuery Mobile移动应用实战》连载五(给按钮加图标)

在范例5-4所使用的导航栏中,已经为按钮加入了图标的样式,但是当时并没有介绍按钮的图标究竟是怎么一回事 ...

微信开发订阅号(ASP.NET MVC4+jquery mobile+AppHarbor发布)

  首先应该去微信公众平台注册一个账号,因为我是用的个人,所以只能注册订阅号,然后需要提供身份证照片, ...

《北风网资深讲师李炎恢jQuery视频教程》含UI、Mobile | 更新至15集[压缩包]

中文名: 北风网资深讲师李炎恢jQuery视频教程 资源格式: 压缩包 主讲人: 李炎恢 ...

关于android自动适应机型分辨率和旋转绘制图片帧的问题.

如题 自动适应只需要2套图+XML里面这几句话就可以吗? 设置图片宽和高为fill_parent就 ...

移动设备类

&lt;?php/** * MIT License * =========== * * Permiss ...

最新问答

更多

python的访问器方法有哪些

使用方法: class A(object): def foo(self,x): #类实例方法 print "executing foo(%s,%s)"%(self,x) @classmethod def class_foo(cls,x): #类方法 print "executing class_foo(%s,%s)"%(cls,x) @staticmethod def static_foo(x): #静态方法 print "executing static_foo(%s)"%x调用方法: a =

使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)

我认为你必须将两个TableGetway传递给UserTable构造。 你必须改变Module.php看看: public function getServiceConfig() { return array( 'factories' => array( 'User\Model\UserTable' => function($sm) { $userTableGateway = $sm->get('UserTable

透明度错误IE11(Transparency bug IE11)

这是一个渲染错误,由使用透明度触发,使用bootstrap用于在聚焦控件周围放置蓝色光环的box-shadow属性。 可以通过添加以下类覆盖来解决它。 .form-control:hover { -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); box-shadow: 0px 0px 4px 0px rgba(0,0,255,1)

linux的基本操作命令。。。

ls 显示目录 mkdir 建立目录 cd 进入目录

响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)

将z-index设置为.main-nav这将解决您的重叠问题 .main-nav { position:relative; z-index:9; } set z-index to .main-nav This will fix your overlaping issue .main-nav { position:relative; z-index:9; }

在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)

这是因为模式规范"a"打开一个文件以便追加,文件指针在末尾。 如果您尝试从此处读取,则由于文件指针位于EOF,因此没有数据。 您应该打开"r+"进行阅读和写作。 如果在写入之前读取整个文件,则在写入更多数据时,文件指针将正确定位以追加。 如果这还不够,请探索ftell()和fseek()函数。 That is because the mode spec "a" opens a file for appending, with the file pointer at the end. If you

NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)

支持空中接口的数据速率是一回事。 在消除协议开销,等待eeprom写入以及所有需要时间的其他内容之后,您看到的数据速率是完全不同的故事。 长话短说,从标签读取或进行对等传输时的实际数据速率峰值约为2.5千字节/秒。 取决于具体的标签或对等技术,它可能比这慢很多。 The supported data-rates of the air-interface are one thing. The data-rate that you see after removing protocol overhe

元素上的盒子阴影行为(box-shadow behaviour on elements)

它看起来像只在Windows上的Chrome的错误。 我在Google Canary (Chrome 63)中也进行了测试,问题依然存在,所以有可能它不会很快修复。 这个问题是由overflow: auto引起的overflow: auto ,在你的情况下,它可以很容易地通过删除或设置为可见(默认)来解决。 但是 ,将鼠标悬停在右侧(顶部和底部)时,会出现滚动条。 一个解决方案可以设置overflow: hidden的身体,所以预期的结果是所需的。 我想指出,这不是一个很好的解决方案,但我建议暂

Laravel检查是否存在记录(Laravel Checking If a Record Exists)

这取决于您是否要以后与用户合作,或仅检查是否存在。 如果要使用用户对象(如果存在): $user = User::where('email', '=', Input::get('email'))->first(); if ($user === null) { // user doesn't exist } 如果你只想检查 if (User::where('email', '=', Input::get('email'))->count() > 0) { // user found

设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)

$scope.getData= function () { var reader = new FileReader(); reader.onload = $('input[type=file]')[0].files; var img = new Image(); img.src =(reader.onload[0].result); img.onload = function() { if(this.width > 640