title

用JS原生写瀑布流

♀尐吖头ヾ 提交于 2020-01-12 14:45:05
效果图 html <!DOCTYPE html> < html > < head > < meta charset = " UTF-8 " > < title > Document </ title > < style > * { margin : 0 ; padding : 0 ; } .container { width : 840px ; background : #cccccc ; margin : auto ; padding-left : 10px ; overflow : hidden ; } .container ul { width : 200px ; margin-right : 10px ; float : left ; list-style : none ; } .container ul li { width : 200px ; position : relative ; background : white ; margin-top : 10px ; } .container ul li img { width : 100% ; height : 90% ; background : url("./images/timg.gif") no-repeat center ; } .container ul li p { height : 30px ;

Different titles for each fragment in my viewpager

冷暖自知 提交于 2020-01-12 04:31:26
问题 I am using a viewpager "tabs + swipe" and I would like to set different titles in the actionBar for each fragment so that when I switch, title changes. I tried several things without success, only the last title displays... and does not change anymore when I switch... 回答1: First, make your activity implement an OnPageChangeListener. Then, when you create your ViewPager , you can use mViewPager.setOnPageChangeListener(this) so that your activity will receive callbacks when the page changes.

字符串方法汇总,大全。python day 6

守給你的承諾、 提交于 2020-01-10 09:40:35
# String的内置方法 # st='hello kitty {name} is {age}' # # print(st.count('l')) # 统计元素个数 # print(st.capitalize()) # 首字母大写 # print(st.center(50,'#')) # 居中 # print(st.endswith('tty3')) # 判断是否以某个内容结尾 # print(st.startswith('he')) # 判断是否以某个内容开头 # print(st.expandtabs(tabsize=20)) # print(st.find('t')) # 查找到第一个元素,并将索引值返回 # print(st.format(name='alex',age=37)) # 格式化输出的另一种方式 待定:?:{} # print(st.format_map({'name':'alex','age':22})) # print(st.index('t')) # print('asd'.isalnum()) # print('12632178'.isdecimal()) # print('1269999.uuuu'.isnumeric()) # print('abc'.isidentifier()) # print('Abc'.islower()) # print(

flutter 基本List

大憨熊 提交于 2020-01-07 08:16:29
import 'package:flutter/material.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final title = 'Basic List'; final tutle2="hahhahaah"; return new MaterialApp( title: tutle2, home: new Scaffold( appBar: new AppBar( title: new Text(title), ), body: new ListView( children: <Widget>[ new ListTile( leading: new Icon(Icons.map), title: new Text('Map'), ), new ListTile( leading: new Icon(Icons.photo), title: new Text('Album'), ), new ListTile( leading: new Icon(Icons.phone), title: new Text('Phone'), ), new ListTile(

flutter 显示来自网上的图片

☆樱花仙子☆ 提交于 2020-01-07 07:00:04
如图 import 'package:flutter/material.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { var title = 'Web Images'; return new MaterialApp( title: title, home: new Scaffold( appBar: new AppBar( title: new Text(title), ), body: new Image.network( 'https://www.baidu.com/img/bd_logo1.png', ), ), ); } } 来源: https://www.cnblogs.com/sea-stream/p/12154464.html

flutter 长列表

╄→尐↘猪︶ㄣ 提交于 2020-01-07 00:21:51
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; void main() { runApp(new MyApp( items: new List<String>.generate(10000, (i) => "Item $i"), )); } class MyApp extends StatelessWidget { final List<String> items; MyApp({Key key, @required this.items}) : super(key: key); @override Widget build(BuildContext context) { final title = 'Long List'; return new MaterialApp( title: title, home: new Scaffold( appBar: new AppBar( title: new Text(title), ), body: new ListView.builder( itemCount: items.length, itemBuilder: (context, index) { return new ListTile( title: new

Make document title change visible in chrome with javascript

僤鯓⒐⒋嵵緔 提交于 2020-01-06 21:10:20
问题 I'm trying to change the document title using document.title = "My Shiny New Title" But the change is not visible in Chrome 51.0.2704.106 (Official Build) (64-bit) It does show as changed in the javascript console or when I use alert, but not in the tab area (next to the favicon). I've found numerous reports that this isn't normal behavior for a web browser, yet I know websites that do change the title. If anyone knows of a workaround for this bug, I'd be extremely grateful. 回答1: It now works

Make document title change visible in chrome with javascript

走远了吗. 提交于 2020-01-06 21:10:11
问题 I'm trying to change the document title using document.title = "My Shiny New Title" But the change is not visible in Chrome 51.0.2704.106 (Official Build) (64-bit) It does show as changed in the javascript console or when I use alert, but not in the tab area (next to the favicon). I've found numerous reports that this isn't normal behavior for a web browser, yet I know websites that do change the title. If anyone knows of a workaround for this bug, I'd be extremely grateful. 回答1: It now works

text box error in android

 ̄綄美尐妖づ 提交于 2020-01-06 16:01:25
问题 hi in my app i have 2 Activity named as A and B. Now i am placing 2 edit boxes for typing the first name and last name, with an OK button in Activity A. After entering the data and pressing OK button i want to show the first name and last name as the title text of Activity B. i have tried and succeed in passing those names to be subject of my mail in the same app. pls help me... 回答1: You can use putExtra and getStringExtra with your Intent to pass String parameters to a new Activity. In

Json与Ajax(注册实例)

对着背影说爱祢 提交于 2020-01-06 15:36:38
需要在服务器上进行哈 jquery的ajax方法: // jquery请求 $.ajax({ url: "./server/slider.json", type: "post", dataType: "json", async: true, success: function(datas) { renderData(datas.slider); } }) // jquery渲染数据 function renderData(data) { var str = ""; $.each(data, function(index, obj) { str += '<a href="' + obj.linkUrl + '"><img src="' + obj.picUrl + '"></a>' }) $("#banner_jq").html(str); } 跨域请求,封装 jsonp 函数 function getJSONP(url, callback) { if (!url) { return; } var a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; //定义一个数组以便产生随机函数名 var r1 = Math.floor(Math.random() * 10); var r2 = Math.floor(Math